Enum webforms::validate::ValidateError
source · pub enum ValidateError {
InputTooShort {
field: &'static str,
min: i64,
},
InputTooLong {
field: &'static str,
max: i64,
},
TooSmall {
field: &'static str,
min: i64,
},
TooLarge {
field: &'static str,
max: i64,
},
InvalidCharacters {
field: &'static str,
},
InvalidEmail {
field: &'static str,
},
InvalidPhoneNumber {
field: &'static str,
},
InvalidRegex {
field: &'static str,
},
FieldMismatch {
field: &'static str,
},
}
Expand description
Errors that can appear if validation fails
Variants
InputTooShort
Input was too short (< min_length)
InputTooLong
Input was too long (> max_length)
TooSmall
Minimum value for an integer field
TooLarge
Maximum value for an integer field
InvalidCharacters
Fields
field: &'static str
Input contained invalid characters (invalid)
InvalidEmail
Fields
field: &'static str
The email entered does not match our email regex
InvalidPhoneNumber
Fields
field: &'static str
The phone number entered does not match our regex
InvalidRegex
Fields
field: &'static str
The field failed the user-passed regex
FieldMismatch
Fields
field: &'static str
Two fields do not match
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ValidateError
impl Send for ValidateError
impl Sync for ValidateError
impl Unpin for ValidateError
impl UnwindSafe for ValidateError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more