Skip to main content

Module validate

Module validate 

Source
Expand description

This module contains all the built-in validations which can be applied to columns.

Each validation function takes a [&crate::prelude::Value] as input and returns a DbmsResult<()> indicating whether the value passes the validation or not.

Structs§

CamelCaseValidator
A validator for CamelCase strings.
CountryIso639Validator
Validator for ISO639 country codes.
CountryIso3166Validator
Validator for ISO3166 country codes.
EmailValidator
A validator for email addresses.
KebabCaseValidator
A validator for kebab-case strings.
MaxStrlenValidator
A validator that checks if the length of a string does not exceed a maximum length.
MimeTypeValidator
A validator that checks if a string is a valid MIME type.
MinStrlenValidator
A validator that checks if the length of a string is at least a minimum length.
PhoneNumberValidator
A validator for phone numbers.
RangeStrlenValidator
A validator that checks if the length of a string is within a specified range.
RgbColorValidator
A validator for RGB color strings.
SnakeCaseValidator
A validator for snake_case strings.
UrlValidator
A validator that checks if a string is a valid URL.

Traits§

Validate
Trait for validating crate::prelude::Values.