Closed jwag956 closed 1 week ago
I don't mind just changing it to ""
or "__form__"
in a feature release.
Thanks - a comment in #595 suggests 'all' - same as django - I don't really care - though using anything that could be confused as core python I think would just cause confusion (also - it isn't all errors!). 'form' seems pretty safe.
I use the empty string ""
in another API library I maintain, which isn't otherwise valid as a form field name.
The decision in 3.0 to use None as a dictionary key for holding form level errors #595 has the unfortunate side-effect of not allowing the JSON serializer to sort keys - which is the default set up by Flask.
One gets the error:
TypeError: '<' not supported between instances of 'NoneType' and 'str'
Not sure of a good solution since it has been this way for a couple years now - a simple but not great solution would be to offer a configuration option to change the key.
I also realize that wtforms isn't explicitly tied to Flask - though as a low level library it would be nice if it didn't force the behavior of applications and higher level frameworks.
Environment