FormCraftRequiredFieldValidator class final
A validator implementation for ensuring a field is not empty.
The validate method checks if the input is empty and returns an error message if true.
Returns null
if the input is not empty.
- Implemented types
Constructors
- FormCraftRequiredFieldValidator([String message = 'Required field'])
-
Constructs a FormCraftRequiredFieldValidator with the specified error
message
.const
Properties
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.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited