pub enum ValidatorType {
Required,
Email,
Url,
MinLength(usize),
MaxLength(usize),
MinValue(f64),
MaxValue(f64),
Pattern(String),
Custom(String),
}Expand description
Validator types
Variants§
Required
Required field
Email format
Url
URL format
MinLength(usize)
Minimum length
MaxLength(usize)
Maximum length
MinValue(f64)
Minimum value
MaxValue(f64)
Maximum value
Pattern(String)
Regex pattern
Custom(String)
Custom validator name
Trait Implementations§
Source§impl Clone for ValidatorType
impl Clone for ValidatorType
Source§fn clone(&self) -> ValidatorType
fn clone(&self) -> ValidatorType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidatorType
impl Debug for ValidatorType
Source§impl<'de> Deserialize<'de> for ValidatorType
impl<'de> Deserialize<'de> for ValidatorType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ValidatorType
impl RefUnwindSafe for ValidatorType
impl Send for ValidatorType
impl Sync for ValidatorType
impl Unpin for ValidatorType
impl UnwindSafe for ValidatorType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more