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
A quick fix consists in adding choices=[] to the SelectedField:
>>> class F(wtforms.Form):
... foo = wtforms.SelectField(choices=[], validate_choice=False)
Expected Behavior
As mentioned in the title, I wasn't expecting a breaking change on that point, as it wasn't in the changelog. I wasn't even expecting a change at all:
>>>importwtforms>>>classF(wtforms.Form):
... foo=wtforms.SelectField(validate_choice=False)
>>>f=F()
>>>f.validate() # no erros
Environment
Python version: 3.8
wtforms version: 3.0.1
I am unsure if you'd rather add this to the documentation somewhere, or fix the compatibility break (which seems quite easy).
I've found a similar issue: #606; except that I'm expecting to be able to not provide any choices at all here.
The text was updated successfully, but these errors were encountered:
Actual Behavior
A quick fix consists in adding
choices=[]
to the SelectedField:Expected Behavior
As mentioned in the title, I wasn't expecting a breaking change on that point, as it wasn't in the changelog. I wasn't even expecting a change at all:
Environment
I am unsure if you'd rather add this to the documentation somewhere, or fix the compatibility break (which seems quite easy).
I've found a similar issue: #606; except that I'm expecting to be able to not provide any choices at all here.
The text was updated successfully, but these errors were encountered: