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

hashCode int
The hash code for this object.
no setterinherited
message String
The error message to be displayed when the validation fails.
final
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.
override

Operators

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