public boolean validate ( boolean scrollToFirstError ) { boolean validated = true ; for ( JQMFormWidget widget : widgetValidators . keySet ( ) ) { if ( ! validate ( widget ) ) validated = false ; } if ( ! validated && scrollToFirstError ) scrollToFirstError ( ) ; return validated ; }
Perform validation for all validators setting error messages where appropriate .