Max<C extends Comparable> class
Annotate a request parameter or the property of a request body to validate its value is less than or equal to the specified value or expression.
Constructors
- Max(C? value, {bool inclusive = true})
-
const
-
Max.expression(Expression<
C> ? expression, {bool inclusive = true}) -
Use an expression to calculate the value instead
const
Properties
-
expression
→ Expression<
C> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inclusive → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → C?
-
final
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(
String propertyName, dynamic propertyValue) → FutureOr< List< ValidationError> > -
Validates a request parameter or the entiry body of a request.
Returns validation errors when the property is not valid according
to this validator.
entity is the enclosing object being validated.
inherited
-
validateJson(
dynamic document, String propertyName, dynamic jsonValue) → FutureOr< List< ValidationError> > -
Validates the field of a JSON object.
Returns validation errors when the property is not valid according
to this validator.
document is the enclosing JSON object being validated.
inherited
-
validateProperty(
dynamic entity, String propertyName, dynamic propertyValue) → List< ValidationError> -
Validates the property of a class.
Returns validation errors when the property is not valid according
to this validator.
entity is the enclosing object being validated.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited