ValidationAnnotation<TValue> class

ValidationAnnotation is the parent class for every validators you will create and use.

Implementers

Constructors

ValidationAnnotation({@required int criticityLevel, @required String error})
const

Properties

criticityLevel int
This reprensents the order of execution for validation. If a validator returns false, the queue will stop on this point. Nexts validators won't be fired.
final
error String
This is the error to display (provided by developers).
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

isValid<TModel>(TValue value, TModel model) bool
Verify if the model is valid compared to the current validator You must add value parameter, this one is your current property to validate. model parameter is also required, even if your custom validator won't use it. It reprensents your full object model with all values. Maybe you would validate a property in comparison to others.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited