pub trait ValidationRule: Send + Sync { // Required methods fn validate(&self, value: &Value) -> Result<()>; fn message(&self) -> String; fn name(&self) -> &'static str; }
Trait for validation rules
Validates the given value
Returns the error message for validation failure
Rule name