This PR simplifies the /register view so that it makes use of the standard WTForm validation rules.
Why this is necessary:
The way the code is written now, the InputRequired validator is never added to the WTForm field, and validation is done in a non-standard way in views.register. This makes it difficult for users to add their own form validation processing (e.g. using a macro as suggested in the Flask documentation), because field.errors will never be set.
Changes include:
WTF field requirements are now read directly from STORMPATH_ENABLE_%s and STORMPATH_REQUIRE_%s
ensure that python setup.py test will only be run for the application's test folder (runs all tests on the Python path otherwise (!?))
fix test that was ignoring 'username' field requirements
This PR simplifies the
/register
view so that it makes use of the standard WTForm validation rules.Why this is necessary:
The way the code is written now, the
InputRequired
validator is never added to the WTForm field, and validation is done in a non-standard way inviews.register
. This makes it difficult for users to add their own form validation processing (e.g. using a macro as suggested in the Flask documentation), becausefield.errors
will never be set.Changes include:
STORMPATH_ENABLE_%s
andSTORMPATH_REQUIRE_%s
python setup.py test
will only be run for the application's test folder (runs all tests on the Python path otherwise (!?))