MapMessage class
A message class for validation errors related to Map<String, dynamic> values.
Extends BaseMessage to include standard validation messages such as required, refine, any, every, and array validation.
Example
final mapMessage = MapMessage(
required: 'A map is required',
refine: 'Invalid map format',
);
print(mapMessage.required); // 'A map is required'
print(mapMessage.refine); // 'Invalid map format'
- Inheritance
-
- Object
- BaseMessage
- MapMessage
Constructors
- MapMessage({String? any, ArrayMessage? array, String? every, String? refine, String? required})
-
Creates a new instance of
MapMessagewith optional custom error messages.
Properties
- any → String
-
The error message used when at least one of multiple validators must pass (
orcondition).finalinherited - array → ArrayMessage
-
The error message container for array-related validation errors.
finalinherited
- every → String
-
The error message used when all of multiple validators must pass (
andcondition).finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- refine → String
-
The error message used when a custom refinement validation fails.
finalinherited
- required → String
-
The error message used when a required value is missing.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? any, ArrayMessage? array, String? every, String? refine, String? required}) → MapMessage -
Creates a copy of the current
MapMessageinstance with updated values.override -
mergeWithBase(
BaseMessage base) → MapMessage -
Merges the current
MapMessageinstance with aBaseMessage, replacing only the undefined values with those from the base. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited