Interface SubmittedVariableValidator
- All Known Implementing Classes:
EnabledFormFieldValidator
,RangeFormFieldValidator
,RegularExpressionFormFieldValidator
,RequiredFormFieldValidator
,StringLengthFormFieldValidator
public interface SubmittedVariableValidator
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validateFormFields
(String variableName, Object variableValue, List<FormVariable> formVariables, Map<String, Object> originalPayload, Map<String, Object> formVariablePayload, Map<String, List<FormVariable>> variableTypes, List<String> errors) Applies restrictions form fields on the submitted variable name and value pair There can be many form variables associated with one form variable name.
-
Method Details
-
validateFormFields
void validateFormFields(String variableName, Object variableValue, List<FormVariable> formVariables, Map<String, Object> originalPayload, Map<String, Object> formVariablePayload, Map<String, List<FormVariable>> variableTypes, List<String> errors) Applies restrictions form fields on the submitted variable name and value pair There can be many form variables associated with one form variable name. e.g one form with 2x text fields (A, B)referencing to the same variable 'text'. Theoretically they can differ in type too. A {{text}} B {{text}} Let's say A(text).minLength = 10, B(text).minLength = 5, if text.length = 2 expected message is only minLength less than 5- Parameters:
variableName
- submitted variable namevariableValue
- submitted variable valueformVariables
- form variables extracted from the form model.originalPayload
- original payload used to determine initial variable valueformVariablePayload
- the current form variable payloadvariableTypes
- contains all variable types to be validatederrors
- put list of created errors
-