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
{{ message }}
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Pokechu22 edited this page May 1, 2015
·
2 revisions
Sometimes it feels like web development is just creating pages of forms that change data for other pages. Fortunately, there are a number of tools to help reduce the drudgery.
Form Creation
Form Submission
validator.py contains a number of classes for form validation - VLang, VLength, etc. These are passed into the validate() function (also in validator.py) as it decorates a controller:
Many of these validators use the errors defined in errors.py. The set_error() method stores errors in a global location.
Now, validate.py also provides a validatedForm() decorator. This function checks to see if any errors are found in that global error store, and if so, alters the response appropriately so we get error messages.