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 (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: