Class ListMinResponseValidator
java.lang.Object
fr.paris.lutece.plugins.forms.validation.AbstractValidator
fr.paris.lutece.plugins.forms.validation.ListMinResponseValidator
- All Implemented Interfaces:
IValidator
Validator to check on the minimum number of selected answers
-
Constructor Summary
ConstructorsConstructorDescriptionListMinResponseValidator(String strValidatorName, String strValidatorDisplayName, List<String> listAvailableEntryType) Constructor of the ListMinResponseValidator -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayHtml(Control control) getJavascriptControlValue(Control control) Only the content of the function should be returned.booleanvalidate(FormQuestionResponse questionResponse, Control control) Methods inherited from class fr.paris.lutece.plugins.forms.validation.AbstractValidator
getListAvailableEntryType, getValidatorBeanName, getValidatorDisplayName, validate
-
Constructor Details
-
ListMinResponseValidator
public ListMinResponseValidator(String strValidatorName, String strValidatorDisplayName, List<String> listAvailableEntryType) Constructor of the ListMinResponseValidator- Parameters:
strValidatorName- The validator bean namestrValidatorDisplayName- The validator display namelistAvailableEntryType- The list of available entrytype
-
-
Method Details
-
getDisplayHtml
- Specified by:
getDisplayHtmlin interfaceIValidator- Overrides:
getDisplayHtmlin classAbstractValidator- Parameters:
control- The control to build model- Returns:
- the HTML to display
-
validate
- Parameters:
questionResponse- The response to controlcontrol- The control to verify- Returns:
- boolean that indicate the validation result
-
getJavascriptValidation
Description copied from interface:IValidatorOnly the content of the function should be returned. The parameter names are in FormsConstants, JS_PARAMETER_INPUT_VALUE and JS_PARAMETER_CONTROL_VALUE- Specified by:
getJavascriptValidationin interfaceIValidator- Overrides:
getJavascriptValidationin classAbstractValidator- Returns:
- the javascript validation code for Conditional display control
-
getJavascriptControlValue
- Specified by:
getJavascriptControlValuein interfaceIValidator- Overrides:
getJavascriptControlValuein classAbstractValidator- Parameters:
control- The control- Returns:
- the control value needed for javascript
-