Version: 1.1
Category: Process
Extended Category: Session Attribute, Session Object
Action Package: Standard Actions
Description
Performs validation of session attributes (text, not binary, values)
Parameter |
Description |
Example |
JSON Rules: |
The set of rules, in JSON, to validate the objects against. |
{ |
Fail Action if Validation Fails: |
[Optional] (true/false) Default value is true (fail on validation error). |
true |
Validation errors attribute: |
Name of the session attribute to write the validation errors to. |
my-validation-attribute |
Clear validation errors attribute: |
Whether to clear the validation errors attribute on success or not. |
true |
JSON Rules
- The property “attributeRules” is an array. Each entry is an attribute rule.
- Each attribute rule has the following properties:
- attribute: Name of the session attribute to validate – must be provided
- regex: The regular expression to validate the session’s value against – must be provided
- optionalAttribute: true/false (false is default) – if validation will succeed if the attribute is missing
- validateAllMultiValues: true/false (false is default) – in case there are multiple values, if validation must succeed for all values or not
- minimumMatches: number (1 is default) – in case of multiple values, at least this many values must succeed validation
- invertResult: true/false (false is default) – in case the session attribute exist, after having performed the validation, if this property is true, invert the result.
- If any of the evaluated session attributes is a binary attribute, the attribute will fail validation (only text attributes are supported)
Use Cases
Example 1: Verify that the usernames are only a-z and A-Z
Will verify that all the username attributes exist, and that they are only a-z and A-Z, and if not, the action will fail.
Parameter |
Value |
JSON Rules: |
{ |
Fail Action if Validation Fails: |
[BLANK] |
DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.
PhenixID - support.phenixid.se