pub struct FieldConfig { /* private fields */ }Expand description
Configuration for a validated field.
Implementations§
Source§impl FieldConfig
impl FieldConfig
Sourcepub fn add_validator<V: Validator + 'static>(self, validator: V) -> Self
pub fn add_validator<V: Validator + 'static>(self, validator: V) -> Self
Add a validator.
Sourcepub fn min_length(self, min: usize) -> Self
pub fn min_length(self, min: usize) -> Self
Add min length validator.
Sourcepub fn max_length(self, max: usize) -> Self
pub fn max_length(self, max: usize) -> Self
Add max length validator.
Sourcepub fn validate_on(self, trigger: ValidateOn) -> Self
pub fn validate_on(self, trigger: ValidateOn) -> Self
Set validation trigger.
Trait Implementations§
Source§impl Debug for FieldConfig
impl Debug for FieldConfig
Source§impl Default for FieldConfig
impl Default for FieldConfig
Source§fn default() -> FieldConfig
fn default() -> FieldConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FieldConfig
impl !RefUnwindSafe for FieldConfig
impl Send for FieldConfig
impl Sync for FieldConfig
impl Unpin for FieldConfig
impl !UnwindSafe for FieldConfig
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