Class RegularExpressionFormFieldValidator
- java.lang.Object
-
- com.flowable.form.engine.impl.validation.RegularExpressionFormFieldValidator
-
- All Implemented Interfaces:
SubmittedVariableValidator
public class RegularExpressionFormFieldValidator extends Object implements SubmittedVariableValidator
-
-
Constructor Summary
Constructors Constructor Description RegularExpressionFormFieldValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
failValidateRegularExpression(String validationRegExp, Object variableValue)
protected boolean
isInvalid(String variableName, Object variableValue, String validationRegExp)
void
validateFormFields(String variableName, Object variableValue, List<FormVariable> formVariables, Map<String,Object> originalPayload, 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 Detail
-
validateFormFields
public void validateFormFields(String variableName, Object variableValue, List<FormVariable> formVariables, Map<String,Object> originalPayload, List<String> errors)
Description copied from interface:SubmittedVariableValidator
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- Specified by:
validateFormFields
in interfaceSubmittedVariableValidator
- Parameters:
variableName
- submitted variable namevariableValue
- submitted variable valueformVariables
- form variables extracted from the form model.originalPayload
- originalPayload used to determine initial variable valueerrors
- put list of created errors
-
isInvalid
protected boolean isInvalid(String variableName, Object variableValue, String validationRegExp)
-
-