Classes that impliment this interface can be used for validation checks.
This method is invoked before validation is run, this is to allow clearing any validation indicators on the View.
This is where all the validation logic is placed.
Returns: true if validation was a success else return false.
Set the error message on the View being validated.
This will invoked when the validation starts, To clear out any previous errors displayed on the View. This is done by passing null as the error message
Its again invoked incase validation fails and error message need to be added to the View.
- error – the error message that needs to be set on the View being validated