validate method

void validate (ValidationContext context, dynamic input)

Custom validations override this method to provide validation behavior.

input is the value being validated. If the value is invalid, the reason is added to context via ValidationContext.addError.

Additional information about the validation event and the attribute being evaluated is available in context. in context.

This method is not run when input is null.

The type of input will have already been type-checked prior to executing this method.


void validate(ValidationContext context, dynamic input) {}