public interface CheckInterface

Classes that impliment this interface can be used for validation checks.



void clearError()

This method is invoked before validation is run, this is to allow clearing any validation indicators on the View.


String getErrorMsg()

The error message to use for the failed validations.

Returns:the error message


boolean run()

This is where all the validation logic is placed.

Returns:true if validation was a success else return false.


void setError(String error)

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