Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel2
minLevel2

...

bgColorwhite

BankAccount

This type checks whether a bank account number is valid. You can use this validation on attributes of base type string.

Syntax

Code Block
<type><locale>
  • Type - The type can be either 'bank' for bank account numbers or 'giro' for giro account numbers, or a combination 'bank/giro'.

  • Locale - Specify the country code for which you want to validate the bankaccount number, e.g. nl_NL for the Netherlands.

Examples

  1. Assume you have added the validation type BankAccount with parameters <bank><nl_NL> to the attribute Client.BankaccountNr, then

    • Client.BankaccountNr = “123456789” is valid;

    • Client.BankaccountNr = “123456780” is invalid.

  2. Assume you have added the validation type BankAccount with parameters <giro><nl_NL> to the attribute Client.BankaccountNr, then

    • Client.BankaccountNr = “P55555” is valid;

    • Client.BankaccountNr = “55555” is invalid.

Back to top

...

bgColorwhite

IBAN

This type validates a string as International Bank Account Number (IBAN) performing a basic mod-97 calculation (ISO 7064) and country specific pattern checks. IBAN has no parameters.

Examples

  • “TN5910006035183598478831” validates as IBAN.

  • “TN5910006035183598478830” does not validate as IBAN.

UI Text Box
typewarning
the validator may return true for invalid bank account numbers. No bank specific account restriction checks are performed.

Back to top

...

bgColorwhite

Date

Use this type to construct validations for specific date formats. You can use this validation on attributes that have base type date.

Syntax

Code Block
<comparedate><comparator><compareday><comparemonth><compareyear>
  • comparedate - Compare the attribute value to a specific date, the dateformat of this date should be 'yyyy/MM/dd'.

  • comparator - The type of comparison, this can be 'less', 'equal' and 'greater'.

  • compareday - There are three options:

    • a number between 1 and 31; the day part of the attribute value is compared with this value.

    • '+' followed by a number; the day part of the attribute value is compared with the current day '+' the specified number.

    • '–' followed by a number; the day part of the attribute value is compared with the current day '–' the specified number.

  • comparemonth - There are three options:

    • a number between 1 and 12; the month part of the attribute value is compared with this value.

    • '+' followed by a number; the month part of the attribute value is compared with the current month '+' the specified number.

    • '–' followed by a number; the month part of the attribute value is compared with the current month '–' the specified number.

  • compareyear - There are three options:

    • a number; the year part of the attribute value is compared with this value.

    • '+' followed by a number; the year part of the attribute value is compared with the current year '+' the specified number.

    • '–' followed by a number; the year part of the attribute value is compared with the current year '–' the specified number.

Examples

Suppose that TODAY = 07-10-2004.

...

Back to top

...

bgColorwhite

Number

This type checks the boundaries of an attribute with base type number, integer, currency or percentage.

Syntax

Code Block
<maxIncl><minIncl><maxExcl><minExcl>
  • maxIncl - The attribute value should be less than or equal to this value.

  • minIncl - The attribute value should be greater than or equal to this value.

  • maxExc - The attribute value should be less than this value.

  • minExcl - The attribute value should be greater than this value.

Examples

...

Back to top

...

bgColorwhite

Regexp


Include Page
Validation type BankAccount for bank account numbers
Validation type BankAccount for bank account numbers


Include Page
Validation type Date
Validation type Date


Include Page
Validation type IBAN
Validation type IBAN


Include Page
Validation type Number
Validation type Number


Include Page
Validation type Regexp for regular expression
Validation type Regexp for regular expression


Include Page
Validation type SofiNumberValidator for Sofi number
Validation type SofiNumberValidator for Sofi number


Include Page
Validation type StringLength for string length
Validation type StringLength for string length

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.

UI Text Box
typewarning

When writing regular expressions, you should make sure that they do not make the system vulnerable to ReDos attacks. The system can give a denial of service when an evil expression is used, that takes very long to evaluate by the parser.
Examples of evil regular expressions:

  • (a+)+
  • ([a-zA-Z]+)*
  • (a|aa)+
  • (a|a?)+
  • (.*a){x} | for x > 10

The above are suspectible to aaaaaaaaaaaaaaaaaaaaaaaa!

It is difficult to give general rules that make sure that your expression is not evil, and even recognizing them can be hard. When writing regular expressions, consider Atomic Groups which help to avoid the evil behavior.

Examples

Postal code

Code Block
<^[0-9]{4}( ?)[a-zA-Z]{2}$>

...

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}$)>

...

E-mail address

Code Block
<^.+@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4})$><(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|\s>

...

UI Text Box
typenote

For more examples, you can check this website: http://www.regexlib.com/

Back to top

...

bgColorwhite

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.

Back to top

...

bgColorwhite

StringLength

This type validates the length of a string value.

Syntax

Code Block
<minLength><maxLength>
  • minLength - The length of the attribute value should be greater than or equal to this value.

  • maxLength - The length of the attribute value should be less than or equal to this value.

Examples

...


UI Expand
titleRelated articles

Content by Label
showLabelsfalse
max5
cqllabel in ("validation","validations","validationtype")


...