CheckInterface

public interface CheckInterface

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

Methods

clearError

void clearError()

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

getErrorMsg

String getErrorMsg()

The error message to use for the failed validations.

Returns:the error message

run

boolean run()

This is where all the validation logic is placed.

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

setError

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.

Parameters:
  • error – the error message that needs to be set on the View being validated