def __init__(self): self.fields = ( oldforms.TextField(field_name="person_name", max_length=50, is_required=True, validator_list=[self.hasNoProfanities]), oldforms.LargeTextField(field_name="comment", max_length=3000, is_required=True, validator_list=[self.hasNoProfanities]), )
def __init__(self): self.fields = ( oldforms.TextField(field_name='username', length=30, max_length=30, is_required=True, validator_list=[ validators.isAlphaNumeric, self.isValidUsername ]), oldforms.PasswordField(field_name='password1', length=30, max_length=60, is_required=True), oldforms.PasswordField( field_name='password2', length=30, max_length=60, is_required=True, validator_list=[ validators.AlwaysMatchesOtherField( 'password1', _("The two password fields didn't match.")) ]), )
def __init__(self, request=None): """ If request is passed in, the manipulator will validate that cookies are enabled. Note that the request (a HttpRequest object) must have set a cookie with the key TEST_COOKIE_NAME and value TEST_COOKIE_VALUE before running this validator. """ self.request = request self.fields = [ oldforms.TextField(field_name="username", length=15, max_length=30, is_required=True, validator_list=[self.isValidUser, self.hasCookiesEnabled]), oldforms.PasswordField(field_name="password", length=15, max_length=30, is_required=True), ] self.user_cache = None
def __init__(self): self.fields = (forms.TextField(field_name="q", is_required=True), )