Enum validator::Validator [−][src]
pub enum Validator { Email, Url, Custom { function: String, argument: Option<CustomArgument>, }, MustMatch(String), Contains(String), Regex(String), Range { min: Option<ValueOrPath<f64>>, max: Option<ValueOrPath<f64>>, }, Length { min: Option<ValueOrPath<u64>>, max: Option<ValueOrPath<u64>>, equal: Option<ValueOrPath<u64>>, }, Nested, Required, RequiredNested, }
Expand description
Contains all the validators that can be used
In this crate as it’s not allowed to export more than the proc macro in a proc macro crate
Variants
Show fields
Fields of Custom
function: String
This is the name of the function that should be called
argument: Option<CustomArgument>
This is the argument type that can be passed in with a macro
MustMatch(String)
Contains(String)
Regex(String)
Show fields
Fields of Range
min: Option<ValueOrPath<f64>>
max: Option<ValueOrPath<f64>>
Show fields
Fields of Length
Implementations
This returns the defined custom argument if it was defined
This returns the defined custom argument if it was defined
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Validator
impl UnwindSafe for Validator
Blanket Implementations
Mutably borrows from an owned value. Read more