FormCraftValidator class sealed

An abstract class for defining form field validators in the FormCraft framework.

Extend this class to create custom validators for your form fields. The validate method should return an error message if validation fails,

Implementers

Constructors

FormCraftValidator.custom({required String message, required bool predicate(String? input)})
A custom validator for use with the FormCraft form validation framework.
const
factory
FormCraftValidator.email([String message])
A validator for validating email addresses.
const
factory
FormCraftValidator.required([String message])
A validator for ensuring a field is not empty.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(String input) String?
Validates the given input and returns an error message if validation fails. Returns null if the input is valid.

Operators

operator ==(Object other) bool
The equality operator.
inherited