LengthRange class
A FieldValidator that restricts the length of a String.
- Inheritance
-
- Object
- RetainedAnnotation
- StructureMetadata
- LengthRange
- Implemented types
Constructors
- LengthRange({int? min, int? max})
-
Restricts the length of this String to
min
(inclusive) and/ormax
(inclusive).const
Properties
Methods
-
annotate(
dynamic cached, dynamic value, DogEngine engine) → AnnotationResult -
Annotates
value
with this validator returning an AnnotationResult. This mechanic is used to provide more information about the validation error.override -
getCachedValue(
DogStructure structure, DogStructureField field) → dynamic -
Returns a cached value for this validator. Will be passed to validate
on every validation.
override
-
isApplicable(
DogStructure structure, DogStructureField field) → bool -
Returns true if this validator is applicable for
field
.override -
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 cached, dynamic value, DogEngine engine) → bool -
Validates
value
against this validator.override -
visit(
APISchemaObject object) → void -
Visit the given
object
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited