private Validator < ValueType > validateRight ( ) { Validator < ValueType > result = null ; Collection < Validator < ValueType > > subValidators = onGetRightErrorMessage ( ) ; if ( subValidators != null ) { for ( Validator < ValueType > validator : subValidators ) { notifyOnValidationFailure ( validator ) ; if ( result == null ) { result = validator ; } } } return result ; }
Validates the current value of the view in order to retrieve the error message and icon which should be shown at the right edge of the view if a validation fails .