Page History
...
This validation type checks whether a string value is part of a specified set of strings. You can use this type to validate a string as a correct postal code format, telephone number or email address.
Syntax
Code Block |
---|
<posRegExp><negRegExp> |
- posRegExp - The attribute value should satisfy this regular expression.
- negRegExp - The attribute value should not satisfy this regular expression.
The following characters are allowed in these regular expressions:
Code Block |
---|
^[0-9]{4}\s{0,1}(?)[a-zA-Z]{2}$ |
The regular expressions used in several Blueriq Studio functions are common Java 1.4 expressions. For a complete documentation we refer to the online java documentation.
Examples
Postal code
Code Block |
---|
<^[0-9]{4}( ?)[a-zA-Z]{2}$> |
Value | Result |
---|---|
“1000 AA” | valid |
“1000AA” | valid |
“10001AA” | invalid |
Telephone number
Code Block |
---|
<(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)> |
Value | Result |
---|---|
“010 1234567” | valid |
“+31(0)10 1234567” | valid |
“010-1234567” | valid |
“010 123456789” | invalid |
E-mail address
Code Block |
---|
<^.+@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4})$><(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)> |
Value | Result |
---|---|
“test@email.nl” | valid |
“test@email.failure” | invalid |
Info |
---|
For more examples, you can check this website: http://www.regexlib.com/ |
SofiNumberValidator
This type checks whether a social security number is valid. You can use this validation on attributes that have base type string.
Syntax
Code Block |
---|
<locale> |
- locale - Specify the country code for which you want to validate the social security number, e.g. nl_NL for the Netherlands.
Examples
Assume you have added the validation type SofiNumberValidator with parameter <nl_NL> to the attribute Client.SocialSecurityNr, then
- Client.SocialSecurityNr = “123456782” is valid;
- Client.SocialSecurityNr = “123456789” is invalid.
...