|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Testing Commands > ITS. / NTS. - If Test Condition > ITS. / NTS. - If Test Condition |
MiniRobotLanguage (MRL)
ITS.Is IBAN
NTS.Is IBAN
To check if a given string conforms to the format of an International Bank Account Number (IBAN).
Intention
Conditional Statement. Test if a given string conforms to the format of an International Bank Account Number (IBAN).
The ITS. command validates the string against the IBAN format, which consists of up to 34 alphanumeric characters. It is a crucial check in financial applications where accurate bank account formatting is necessary.
The NTS. is the negative form of ITS. and tests if the string is not in the IBAN format.
Validation does not confirm the existence or ownership of the bank account, only the structural validity of the IBAN.
TST.generate random iban|DE|$$N13
ITS.Is IBAN|$$N13
DBP.$$N13 is a valid IBAN.
ELS.
DBP.$$N13 is NOT a valid IBAN.
EIF.
ENR.
Syntax
ITS.Is IBAN|P1 … ELS. … EIF.
NTS.Is IBAN|P1 … ELS. … EIF.
Parameter Explanation
P1 - The variable containing the string to be tested against the IBAN format.
Example
'***********************************
' ITS.-Sample
'***********************************
' Generate a random German IBAN and store in $$N13
TST.generate random iban|DE|$$N13
' Check if $$N13 is a valid IBAN format
ITS.Is IBAN|$$N13
' Print the validation result
DBP.$$N13 is a valid IBAN.
ELS.
DBP.$$N13 is NOT a valid IBAN.
EIF.
' Conclude the script
ENR.
Remarks
-
Limitations:
Validation does not confirm the existence or ownership of the bank account, only the structural validity of the IBAN.
ITS./NTS. can be nested to unlimited Depth, and they can also enclose Sub-Program Calls or FEX. (Enumerations) to unlimited Depth.
See also:
•