pub enum ValidationErrorKind {
Show 13 variants
Min,
Max,
MinLength,
MaxLength,
Pattern,
Required,
Custom,
Model,
MultipleOf,
MinItems,
MaxItems,
UniqueItems,
CreditCard,
}Expand description
The type of validation constraint that was violated.
Variants§
Min
Value is below minimum
Max
Value is above maximum
MinLength
String is shorter than minimum length
MaxLength
String is longer than maximum length
Pattern
Value doesn’t match regex pattern
Required
Required field is missing/null
Custom
Custom validation failed
Model
Model-level validation failed
MultipleOf
Value is not a multiple of the specified divisor
MinItems
Collection has fewer items than minimum
MaxItems
Collection has more items than maximum
UniqueItems
Collection contains duplicate items
CreditCard
Invalid credit card number (Luhn check failed)
Trait Implementations§
Source§impl Clone for ValidationErrorKind
impl Clone for ValidationErrorKind
Source§fn clone(&self) -> ValidationErrorKind
fn clone(&self) -> ValidationErrorKind
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 ValidationErrorKind
impl Debug for ValidationErrorKind
Source§impl PartialEq for ValidationErrorKind
impl PartialEq for ValidationErrorKind
impl Copy for ValidationErrorKind
impl Eq for ValidationErrorKind
impl StructuralPartialEq for ValidationErrorKind
Auto Trait Implementations§
impl Freeze for ValidationErrorKind
impl RefUnwindSafe for ValidationErrorKind
impl Send for ValidationErrorKind
impl Sync for ValidationErrorKind
impl Unpin for ValidationErrorKind
impl UnwindSafe for ValidationErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).