FieldValidator<T, R> class

Available Extensions

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allWhen(bool condition(TransformedValue<T, R> value)) FieldValidator<T, R>
if the condition returns false then all previous validation will be ignored
allWhenNot(bool condition(TransformedValue<T, R> value)) FieldValidator<T, R>
if the condition returns true then all previous validation will be ignored
call(T value) String?
the call method to be used with form fields
errors(T value) List<String>
get all errors
isValid(T value) bool
check if the value is valid
multiValidate(List<ValidatorForCallBack<T, R>> validators) FieldValidator<T, R>
validate a sub field without transform current validator
next(String? next(ReadyValidationMessages messages, R value)) FieldValidator<T, R>
add the next validation to the validations tree
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transform<Res>(Res convert(R value)) FieldValidator<T, Res>
transform from the current type to another type
transformBack() FieldValidator<T, T>
transform from the current type to another type
validatorFor<Res>(FieldValidator<T, Res> validator(ReadyValidationMessages messages, R value)) FieldValidator<T, R>
validate a sub field without transform current validator
when(bool condition(TransformedValue<T, R> value)) FieldValidator<T, R>
if the condition returns false then the previous validation will be ignored
whenNot(bool condition(TransformedValue<T, R> value)) FieldValidator<T, R>
if the condition returns true then the previous validation will be ignored
withMessages(ReadyValidationMessagesAr messages) FieldValidator<T, R>
replace the messages all the next validations will use the new messages the old messages will be kept in the _prevErrors

Operators

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