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

Constructors

MapMessage({String? any, ArrayMessage? array, String? every, String? refine, String? required})
Creates a new instance of MapMessage with optional custom error messages.

Properties

any String
The error message used when at least one of multiple validators must pass (or condition).
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 (and condition).
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 MapMessage instance with updated values.
override
mergeWithBase(BaseMessage base) MapMessage
Merges the current MapMessage instance with a BaseMessage, 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