Regexp
Validates that a column value matches the given regular expression.
Overview
Example:
import clearskies
class MyModel(clearskies.Model):
id_column_name = "id"
backend = clearskies.backends.MemoryBackend()
id = clearskies.columns.Uuid()
version = clearskies.columns.String(validators=[clearskies.validators.Regexp(r"\d+\.\d+\.\d+")])
regexp
Required
The regular expression that input must match.
include_regexp_in_error
Optional
Whether or not to include the regular expression in the error message, if the input doesn’t match.