Validators

Additional validators

The django_extras.core.validators module contains a collection of callable validators for use with model and form fields. They’re used internally but are available for use with your own fields, too. They can be used in addition to, or in lieu of custom field.clean() methods.

validate_color

validate_color

A RegexValidator instance that ensures a value looks like a CSS color value.

validate_alpha_color

validate_alpha_color

A RegexValidator instance that ensures a value looks like a CSS color value. Supports color definitions with alpha blending.

validate_json

validate_json

A JsonValidator instance that ensures a value is valid JSON.