view examples/tutorial/geddit/form.py @ 702:ebae1774d188

Improve error reporting when accessing an attribute in a Python expression raises an `AttributeError`. Closes #191. Thanks to Michele Cella for the patch!
author cmlenz
date Mon, 31 Mar 2008 09:30:26 +0000
parents 71d3edd302ae
children
line wrap: on
line source
from formencode import Schema, validators


class LinkForm(Schema):
    username = validators.UnicodeString(not_empty=True)
    url = validators.URL(not_empty=True, add_http=True, check_exists=False)
    title = validators.UnicodeString(not_empty=True)


class CommentForm(Schema):
    username = validators.UnicodeString(not_empty=True)
    content = validators.UnicodeString(not_empty=True)
Copyright (C) 2012-2017 Edgewall Software