Пример #1
0
 def messages(self):
     return {
             'invalid_type': _(u'Validator got unexpected input (expected string, got "%(classname)s").'),
             'invalid_number': _(u'Please enter a number.'),
             'too_low': _(u'Number must be %(min)d or greater.'),
             'too_big': _(u'Number must be %(max)d or smaller.'),
            }
Пример #2
0
 def messages(self):
     return {
         'invalid_domain_character': _('Invalid character %(invalid_character)s in domain %(domain)s.'),
         'leading_dot':       _('Invalid domain: %(domain)s must not start with a dot.'),
         'trailing_dot':      _('Invalid domain: %(domain)s must not end with a dot.'),
         'double_dot':        _('Invalid domain: %(domain)s must not contain consecutive dots.'),
     }
Пример #3
0
 def messages(self):
     return {
         'invalid_domain_character': _('Invalid character "%(invalid_character)s" in domain "%(domain)s".'),
         'leading_dot':       _('Invalid domain: "%(domain)s" must not start with a dot.'),
         'trailing_dot':      _('Invalid domain: "%(domain)s" must not end with a dot.'),
         'double_dot':        _('Invalid domain: "%(domain)s" must not contain consecutive dots.'),
     }
Пример #4
0
 def messages(self):
     return {
             'invalid_type': _(u'Validator got unexpected input (expected string, got "%(classname)s").'),
             'invalid_number': _(u'Please enter a number.'),
             'too_low': _(u'Number must be %(min)d or greater.'),
             'too_big': _(u'Number must be %(max)d or smaller.'),
            }
Пример #5
0
 def messages(self):
     return {
         'invalid_type':
         _(u'Validator got unexpected input (expected string, got %(classname)s).'
           ),
         'too_long':
         _(u'Please enter at maximum %(max_length) characters.')
     }
Пример #6
0
 def messages(self):
     return {
         'invalid_type':
         _(u'Validator got unexpected input (expected "dict", got "%(classname)s").'
           ),
         'additional_item':
         _(u'Undeclared field detected: "%(additional_item)s".'),
     }
Пример #7
0
 def messages(self):
     return {
         'invalid_type':
         _(u'Validator got unexpected input (expected string, got "%(classname)s").'
           ),
         'too_long':
         _(u'Must be less than %(max)d characters long.'),
         'too_short':
         _(u'Must be at least %(min)d characters long.'),
     }
Пример #8
0
 def messages(self):
     return {
         'single_at':
         _(u"An email address must contain a single '@'."),
         'invalid_email_character':
         _(u'Invalid character "%(invalid_character)s" in email address "%(emailaddress)s".'
           ),
         'missing_domain':
         _(u'Missing domain in email address "%(emailaddress)s".'),
     }
Пример #9
0
 def _check_consistency_additional_and_filtered_parameters(self):
     if (not self.allow_additional_parameters) and (
             not self.filter_unvalidated_parameters):
         message = _(
             u'if "allow_additional_parameters" is False, "filter_unvalidated_parameters=False" is meaningless'
         )
         raise InvalidArgumentsError(message)
Пример #10
0
 def messages(self):
     return {
         'unknown_bool':
         _(u'Value should be "%s" or "%s".') %
         (self.trueish[0], self.falsish[0])
     }
Пример #11
0
 def messages(self):
     return {
         'single_at':         _(u"An email address must contain a single '@'."),
         'invalid_email_character': _(u'Invalid character %(invalid_character)s in email address %(emailaddress)s.'),
     }
Пример #12
0
 def messages(self):
     return {'empty': _('Value must not be empty.')}
Пример #13
0
 def messages(self):
     return {
         'value_not_allowed': _(u'This value is not allowed.'),
     }
Пример #14
0
 def messages(self):
     return {
             'invalid_type': _(u'Validator got unexpected input (expected "dict", got "%(classname)s").'),
             'additional_items': _(u'Additional fields detected: %(additional_items)s.'),
            }
 def messages(self):
     return {
             'invalid_type': _(u'Validator got unexpected input (expected string, got %(classname)s).'),
             'too_long': _(u'Please enter at maximum %(max_length) characters.')
            }
Пример #16
0
 def messages(self):
     return {
         'additional_items': _('Too many parameters: %(additional_items)s')
     }
Пример #17
0
 def messages(self):
     return {'empty': _('Value must not be empty.')}
Пример #18
0
 def messages(self):
     return {
         'invalid_type': _(u'Validator got unexpected input (expected string, got "%(classname)s").'),
         'too_short': _(u'More than %(min)d items required.'),
         'too_long': _(u'Less than %(max)d items required.'),
     }
Пример #19
0
 def messages(self):
     return {"additional_items": _("Too many parameters: %(additional_items)s")}
Пример #20
0
 def messages(self):
     return dict(mismatch=_(u'Fields do not match'))
Пример #21
0
 def messages(self):
     return {"invalid_type": _(u'Validator got unexpected input (expected string, got "%(classname)s").')}
Пример #22
0
 def messages(self):
     return {'must_agree': _(u'Please accept our Terms and Conditions.')}
Пример #23
0
 def messages(self):
     return {
         'additional_item': _('Unknown parameter "%(additional_item)s"')
     }