Skip to content

Commit

Permalink
fix: InputRequired sen error only when data is None
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniosobrinho committed May 7, 2024
1 parent 992145f commit 265b864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wtforms/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def __init__(self, message=None):
self.field_flags = {"required": True}

def __call__(self, form, field):
if field.raw_data and field.raw_data[0]:
if field.raw_data is not None and field.raw_data[0] is not None:
return

if self.message is None:
Expand Down

0 comments on commit 265b864

Please sign in to comment.