Return to Snippet

Revision: 3524
at August 6, 2007 22:57 by ches


Updated Code
import formencode

class EmailForm(formencode.Schema): 
    allow_extra_fields = True
    filter_extra_fields = True
    email = formencode.validators.Email(not_empty=True)

Revision: 3523
at August 6, 2007 22:55 by ches


Initial Code
import formencode class EmailForm(formencode.Schema): allow_extra_fields = True filter_extra_fields = True email = formencode.validators.Email(not_empty=True)

Initial URL
http://wiki.pylonshq.com/display/pylonsdocs/Form+Handling

Initial Description
model/form.py is a good place to put schemata in a pylons app: easy to build with inheritance and accessible to controllers via model.form.EmailForm, etc. See the link for further info on the _extra_fields options -- this one is intended for just two fields: a text field and submit button.

Initial Title
FormEncode Email Address validation schema

Initial Tags
python, validation

Initial Language
Python