<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=4138537&amp;fmt=gif">
Skip to content
English
  • There are no suggestions because the search field is empty.

.isValidCountryCode()

Method checks if the given country code is valid.

Description of the method

Description: .isValidCountryCode() method checks if the given country code is valid based on the list that can be found here:  (http://www.iso.org/iso/country_names..._code_elements).
Available for: string
Parameters: -
Return type: boolean

 Example

Context: HeaderType1
OCL: self.PstlAdr.Ctry.isValidCountryCode()
Description: The example rule checks if the given country code is valid.

 

The XML snippet below would pass this check.

<PstlAdr>
    <Ctry>FI</Ctry>
</PstlAdr>

The other snippet below however would not pass this check.

<PstlAdr>
    <Ctry>Finland</Ctry>
</PstlAdr>