annotations.comparison library

To use, import package:validations/annotations/comparison.dart

Classes

DecimalMax
Checks whether the annotated value is less than the specified maximum, when inclusive=false. Otherwise whether the value is less than or equal to the specified maximum. The parameter value is the string representation of the max value.
DecimalMin
Checks whether the annotated value is larger than the specified minimum, when inclusive=false. Otherwise whether the value is larger than or equal to the specified minimum. The parameter value is the string representation of the min value.
DivisibleBy
Checks whether the annotated value is divisible by the specified value.
DurationMax
Checks that annotated Duration element is not greater than the one constructed from annotation parameters. Equality is allowed if inclusive flag is set to true.
DurationMin
Checks that annotated Duration element is not less than the one constructed from annotation parameters. Equality is allowed if inclusive flag is set to true.
EqualTo
Checks whether the annotated value is equal to another value.
GreaterThan
Checks whether the annotated value is higher than the specified value.
GreaterThanOrEqual
Checks whether the annotated value is higher than or equal to the specified minimum.
IdenticalTo
Checks whether the annotated value is identical to another value.
LessThan
Checks whether the annotated value is less than the specified value.
LessThanOrEqual
Checks whether the annotated value is less than or equal to the specified maximum.
Max
Checks whether the annotated value is less than or equal to the specified maximum.
Min
Checks whether the annotated value is higher than or equal to the specified minimum.
NotEqualTo
Checks whether the annotated value is not equal to another value.
NotIdenticalTo
Checks whether the annotated value is not identical to another value.
Range
Checks whether the annotated value lies between (inclusive) the specified minimum and maximum

Properties

comparisonAnnotations → List<Type>
final