coalition.content.validators

Reusable validators for content models.

Attributes

VALID_VIDEO_EXTENSIONS

HEX_COLOR_PATTERN

Functions

validate_video_file_extension(→ None)

Validate that the uploaded file is a supported video format.

validate_hex_color(→ None)

Validate that the value is a valid hex color code.

Module Contents

coalition.content.validators.VALID_VIDEO_EXTENSIONS = ['.mp4'][source]
coalition.content.validators.HEX_COLOR_PATTERN[source]
coalition.content.validators.validate_video_file_extension(value: Any) None[source]

Validate that the uploaded file is a supported video format.

coalition.content.validators.validate_hex_color(value: str) None[source]

Validate that the value is a valid hex color code.