~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/base/forms.py

  • Committer: William Grant
  • Date: 2010-02-23 08:55:42 UTC
  • mto: This revision was merged to the branch mainline in revision 1674.
  • Revision ID: grantw@unimelb.edu.au-20100223085542-r8xw14bxxoraza51
Permit underscores in all names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
            ctx['error_value'] = errors
107
107
 
108
108
 
109
 
VALID_URL_NAME = re.compile(r'^[a-z0-9][a-z0-9\+\.\-]*$')
 
109
VALID_URL_NAME = re.compile(r'^[a-z0-9][a-z0-9_\+\.\-]*$')
110
110
 
111
111
 
112
112
class URLNameValidator(formencode.validators.UnicodeString):
115
115
        if not VALID_URL_NAME.match(value):
116
116
            raise formencode.Invalid(
117
117
                'Must consist of an alphanumeric character followed by any '
118
 
                'number of alphanumerics, ., + or -.',
 
118
                'number of alphanumerics, ., +, - or _.',
119
119
                value, state)