You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0 (zero) value not allowed for DecimalField with NumberRange validator for DataRequired
latitude = DecimalField(
validators=[DataRequired(), NumberRange(min=-90, max=90)],
render_kw={
"placeholder": "Latitude, e.g. 55.9397°",
"title": "Latitude",
},
places=6,
)
The problem seems to be the DataRequired that checks "if field.data" which I assume should be if field.data is not None
Could use InputRequired instead, but for some users, this field is ReadOnly in my application, which means that InputRequired is not validated correctly either.
0 is between -90 and 90
Environment:
Python version: 3.10.9
Flask-WTF version:1.2.1
Flask version:2.3.3
The text was updated successfully, but these errors were encountered:
0 (zero) value not allowed for DecimalField with NumberRange validator for DataRequired
The problem seems to be the DataRequired that checks "if field.data" which I assume should be if field.data is not None
Could use InputRequired instead, but for some users, this field is ReadOnly in my application, which means that InputRequired is not validated correctly either.
0 is between -90 and 90
Environment:
The text was updated successfully, but these errors were encountered: