core.validators.EmailValidator.whitelist

whitelist Whitelist of email domains to allow. By default, a regular expression (the domain_regex attribute) is used to validate whatever appears after the @ sign. However, if that string appears in the whitelist, this validation is bypassed. If not provided, the default whitelist is ['localhost']. Other domains that don’t contain a dot won’t pass validation, so you’d need to whitelist them as necessary.

core.validators.MaxLengthValidator

class MaxLengthValidator(max_length, message=None) [source] Raises a ValidationError with a code of 'max_length' if the length of value is greater than max_length.

core.validators.int_list_validator()

int_list_validator(sep=', ', message=None, code='invalid', allow_negative=False) [source] New in Django 1.9. Returns a RegexValidator instance that ensures a string consists of integers separated by sep. It allows negative integers when allow_negative is True. Changed in Django 1.10: The allow_negative parameter was added.

core.validators.MinLengthValidator

class MinLengthValidator(min_length, message=None) [source] Raises a ValidationError with a code of 'min_length' if the length of value is less than min_length.

core.validators.EmailValidator.message

message The error message used by ValidationError if validation fails. Defaults to "Enter a valid email address".

core.validators.MaxValueValidator

class MaxValueValidator(max_value, message=None) [source] Raises a ValidationError with a code of 'max_value' if value is greater than max_value.

core.signing.TimestampSigner

class TimestampSigner(key=None, sep=':', salt=None) [source] sign(value) [source] Sign value and append current timestamp to it. unsign(value, max_age=None) [source] Checks if value was signed less than max_age seconds ago, otherwise raises SignatureExpired. The max_age parameter can accept an integer or a datetime.timedelta object.

core.validators.DecimalValidator

class DecimalValidator(max_digits, decimal_places) [source] New in Django 1.9. Raises ValidationError with the following codes: 'max_digits' if the number of digits is larger than max_digits. 'max_decimal_places' if the number of decimals is larger than decimal_places. 'max_whole_digits' if the number of whole digits is larger than the difference between max_digits and decimal_places.

core.signing.TimestampSigner.unsign()

unsign(value, max_age=None) [source] Checks if value was signed less than max_age seconds ago, otherwise raises SignatureExpired. The max_age parameter can accept an integer or a datetime.timedelta object.

core.signing.TimestampSigner.sign()

sign(value) [source] Sign value and append current timestamp to it.