pub trait FieldRule<E>: Send + Sync {
// Required method
fn validate(&self, entity: &E) -> Vec<ValidationError>;
}Expand description
A single validation rule applied to an entity.
Implement this to create custom rules beyond the built-ins.
Required Methods§
fn validate(&self, entity: &E) -> Vec<ValidationError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".