Interface IValidator
- All Known Implementing Classes:
AbstractDateValidator,AbstractDayDistanceValidator,AbstractListQuestionValidator,AbstractNumberValidator,AbstractPatternValidator,AbstractValidator,DateInferiorValidator,DateSuperiorValidator,DayDelayMinimumValidator,GeolocationAddressPatternValidator,ListExactResponseValidator,ListMaxResponseValidator,ListMinResponseValidator,ListValueValidator,NumberInferiorValidator,NumberSuperiorValidator,PatternFileTypeValidator,PatternValidator,UniqueValidator
public interface IValidator
Interface which describe the validation process
-
Method Summary
Modifier and TypeMethodDescriptiongetDisplayHtml(Control control) getJavascriptControlValue(Control control) Only the content of the function should be returned.booleanvalidate(FormQuestionResponse questionResponse, Control control) booleanvalidate(List<FormQuestionResponse> questionResponse, Control control)
-
Method Details
-
getValidatorBeanName
String getValidatorBeanName()- Returns:
- the validator bean name
-
getValidatorDisplayName
String getValidatorDisplayName()- Returns:
- the validator display name
-
getDisplayHtml
- Parameters:
control- The control to build model- Returns:
- the HTML to display
-
getListAvailableEntryType
- Returns:
- the list of available entrytype for this validator
-
validate
- Parameters:
questionResponse- The response to controlcontrol- The control to verify- Returns:
- boolean that indicate the validation result
-
validate
- Parameters:
questionResponse- The List response to controlcontrol- The control to verify- Returns:
- boolean that indicate the validation result
-
getJavascriptValidation
String getJavascriptValidation()Only the content of the function should be returned. The parameter names are in FormsConstants, JS_PARAMETER_INPUT_VALUE and JS_PARAMETER_CONTROL_VALUE- Returns:
- the javascript validation code for Conditional display control
-
getJavascriptControlValue
- Parameters:
control- The control- Returns:
- the control value needed for javascript
-