ListSizeValidator class
Ensures that a list has a number of elements within a specific range.
- Implemented types
- Available Extensions
Constructors
- ListSizeValidator(String name, {required int min, int? max})
-
name is traversed using JsonMap.read to find the base list
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- max → int?
-
the inclusive maximum number of elements in the list. If
this is null, then there will be no maximum bound.
final
- message → String
-
The message to be displayed if validate fails.
no setteroverride
- min → int
-
the inclusive minimum number of elements in the list.
final
- name → String
-
name is split using '.' and the map is traversed sequentially until the
value is returned.
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(
Map< String, dynamic> map) → bool -
Returns true if the given
map
from BaseModel.toMap passes this Validator's check.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited