Class AbstractValidator
java.lang.Object
fr.paris.lutece.plugins.forms.validation.AbstractValidator
- All Implemented Interfaces:
IValidator
- Direct Known Subclasses:
AbstractDateValidator,AbstractDayDistanceValidator,AbstractListQuestionValidator,AbstractNumberValidator,AbstractPatternValidator,ListExactResponseValidator,ListMaxResponseValidator,ListMinResponseValidator,ListValueValidator,UniqueValidator
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractValidator(String strValidatorName, String strValidatorDisplayName, List<String> listAvailableEntryType) Constructor of the AbstractValidatorAbstractValidator(String strValidatorName, String strValidatorDisplayName, List<String> listAvailableEntryType, Locale locale) Constructor of the AbstractValidator -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayHtml(Control control) getJavascriptControlValue(Control control) Only the content of the function should be returned.booleanvalidate(List<FormQuestionResponse> formQuestionResponse, Control control) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.paris.lutece.plugins.forms.validation.IValidator
validate
-
Constructor Details
-
AbstractValidator
public AbstractValidator(String strValidatorName, String strValidatorDisplayName, List<String> listAvailableEntryType) Constructor of the AbstractValidator- Parameters:
strValidatorName- The validator bean namestrValidatorDisplayName- The validator display namelistAvailableEntryType- The list of available entrytype
-
AbstractValidator
public AbstractValidator(String strValidatorName, String strValidatorDisplayName, List<String> listAvailableEntryType, Locale locale) Constructor of the AbstractValidator- Parameters:
strValidatorName- The validator bean namestrValidatorDisplayName- The validator display namelistAvailableEntryType- The list of available entrytypelocale- The locale
-
-
Method Details
-
validate
- Specified by:
validatein interfaceIValidator- Parameters:
formQuestionResponse- The List response to controlcontrol- The control to verify- Returns:
- boolean that indicate the validation result
-
getValidatorBeanName
- Specified by:
getValidatorBeanNamein interfaceIValidator- Returns:
- the validator bean name
-
getValidatorDisplayName
- Specified by:
getValidatorDisplayNamein interfaceIValidator- Returns:
- the validator display name
-
getDisplayHtml
- Specified by:
getDisplayHtmlin interfaceIValidator- Parameters:
control- The control to build model- Returns:
- the HTML to display
-
getListAvailableEntryType
- Specified by:
getListAvailableEntryTypein interfaceIValidator- Returns:
- the list of available entrytype for this validator
-
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- Returns:
- the javascript validation code for Conditional display control
-
getJavascriptControlValue
- Specified by:
getJavascriptControlValuein interfaceIValidator- Parameters:
control- The control- Returns:
- the control value needed for javascript
-