.isValidReference('FI')

Method checks if the given text is a valid Finnish reference.

Description of the method

Description: .isValidReference('FI') method checks if the given text is a valid Finnish reference. (Viitesiirtonumero) Method checks that the value is numeric and contains from 3 to 20 characters.
Available for: string
Parameters: -
Return type: boolean

 Example

Context: TransactionType1
OCL: self.Amount.REF.isValidReference('FI')
Description: The example rule checks if the given reference is valid.

 

The XML snippet below would pass this check.

<Amount>
    <REF>1234561</REF>
</Amount>

The other snippet below however would not pass this check.

<Amount>
    <REF>AA123123</REF>
</Amount>