Skip to main content

FormValidator

Type Alias FormValidator 

Source
pub type FormValidator = fn(&str) -> Result<(), String>;
Expand description

Bare function-pointer validator used by the deprecated positional FormState::validate API.

Retained for backward compatibility. New code should attach Validator closures per field via FormField::validate; see the validators module for built-ins.