@ Override protected void validateComponent ( final List < Diagnostic > diags ) { super . validateComponent ( diags ) ; List < ? > selected = getValue ( ) ; // Only validate max and min if options have been selected if ( ! selected . isEmpty ( ) ) { int value = selected . size ( ) ; int min = getMinSelect ( ) ; int max = getMaxSelect ( ) ; if ( min > 0 && value < min ) { diags . add ( createErrorDiagnostic ( InternalMessages . DEFAULT_VALIDATION_ERROR_MIN_SELECT , this , min ) ) ; } if ( max > 0 && value > max ) { diags . add ( createErrorDiagnostic ( InternalMessages . DEFAULT_VALIDATION_ERROR_MAX_SELECT , this , max ) ) ; } } }
Override WInput s validateComponent to perform further validation on the options selected .