form_shield library

Classes

AppLocalizationDelegate
AsyncValidationRule<T>
Base interface for asynchronous validation rules.
AsyncValidationState
Manages the state of asynchronous validation with notifiers.
AsyncValidationStateData
AsyncValidator<T>
A validator specifically designed for asynchronous validation operations.
CompositeValidator<T>
A validator that composes multiple validators together.
CreditCardRule
Validates that a string is a valid credit card number using the Luhn algorithm.
CustomRule<T>
A validation rule that uses a custom function to validate values.
DateRangeRule
Validates that a date range between two text fields is valid.
DateRule
Validates that a date string is within specified bounds.
DynamicCustomRule<T>
A validation rule that uses a custom function to validate values and return a dynamic error message.
EmailRule
Validates that a string is a valid email address.
FormInputMaxValueRule
Validates that a numeric value is at most a specified maximum. Works with form inputs.
FormInputMinValueRule
Validates that a numeric value is at least a specified minimum. Works with form inputs.
FormInputValueRule
Validates that a numeric value is at least a specified minimum. Works with form inputs.
FormShieldI18n
FormShieldLocalizations
Helper class to safely access localization strings.
IPAddressRule
Validates that a string is a valid IP address (IPv4 or IPv6).
LengthRule
Validates that a string's length is within specified bounds.
MaxLengthRule
Validates that a string's length is at most a specified maximum.
MaxValueRule
Validates that a numeric value is at most a specified maximum.
MinLengthRule
Validates that a string's length is at least a specified minimum.
MinValueRule
Validates that a numeric value is at least a specified minimum.
PasswordMatchRule
Validates that a string matches another string (e.g., for password confirmation).
PasswordOptions
Configuration options for password validation.
PasswordRule
Validates that a string meets password requirements.
PhoneRule
Validates that a string is a valid phone number.
RequiredRule<T>
Validates that a value is not null or empty.
URLRule
Validates that a string is a valid URL.
ValidationResult
Represents the result of a validation operation.
ValidationRule<T>
Base interface for all validation rules.
Validator<T>
A validator that can be used with Flutter's form validation system.
ValueRule
Validates that a numeric value is within specified bounds.

Functions

asyncValidator<T>(List<ValidationRule<T>> rules, {Duration debounceDuration = const Duration(milliseconds: 300)}) AsyncValidator<T>
compositeValidator<T>(List<String? Function(T?)> syncValidators, List<AsyncValidator<T>> asyncValidators) CompositeValidator<T>
Creates a CompositeValidator with the provided list of synchronous validators.
validator<T>(List<ValidationRule<T>> rules) String? Function(T?)