ModelValidator class abstract
A base abstract class for model validation. This class provides default implementations for common validation methods, such as validating a model, retrieving validation messages, and formatting messages.
Constructors
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
-
message(
dynamic model, [String messagePrefix = '- ']) → String - Formats the validation messages into a single string.
-
messages(
dynamic model) → List< String> - Retrieves a list of validation messages for the given model. By default, this method returns an empty list.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
dynamic model) → bool -
Validates the given model.
Returns
true
if the model is valid, otherwisefalse
. By default, this method always returnstrue
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited