Versions Compared

Key

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

The syntax for the <product_code>.xml is shown in the following code snippet:

Code Block
languagexml
<?xml version="1.0" encoding="UTF-8"?>

...


<validate>

...


<FUNCTIONCODE_ACTIONCODE>

...


<fieldType attribute1="value" attribute2="value" ... attributen="value"> FIELD_NAME1 </fieldType>

...


.

...


.

...


.

...


<fieldType attribute1="value" attribute2="value" ... attributen="value"> FIELD_NAMEn </fieldType>

...


<collection name="COLLECTION1" mandatory="true">

...


<fieldType attribute1="value" attribute2="value" ... attributen="value"> FIELD_NAME1 </fieldType>

...


.

...


.

...


.

...


<fieldType attribute1="value" attribute2="value" ... attributen="value"> FIELD_NAMEn </fieldType>

...

 
<collection name="COLLECTION2" mandatory="false">

...


<fieldType attribute1="value" attribute2="value" ... attributen="value"> FIELD_NAME1 </fieldType>

...


</collection>

...


</collection>

...


</FUNCTIONCODE_ACTIONCODE>

...


</validate>

 

The <product_code>.xml file must contain the following tags for validating the data at server-side:

...

  • The <FUNCTIONCODE_ACTIONCODE> tag consists of the following tags:
    • The <fieldType> tag is used to identify the fields that need validation. Independent <fieldType> tags must be specified for every field that is required to be validated. The attributes of the <fieldType> tag enable you to define the validations for any specific field.
    • The <collection> tag is used to identify the container fields that encompass other fields within it. As mentioned in the above point, independent <fieldType> tags must be specified for every field within the container field that requires validation.


Anchor
_Attributes_of_the
_Attributes_of_the
Anchor
_Toc507069450
_Toc507069450
Anchor
_Toc507487141
_Toc507487141
Attributes of the <fieldType> Tag

The details of the attributes of the <fieldType> tag and their values are provided in the following table:

Attribute

Acceptable Values

Type

  • ANY - Indicates that the field can accept any type of value and there's no need for validation.
  • XA - Indicates that only the alphabetic characters are allowed.
  • XAU - Indicates that only the UPPERCASE alphabetic characters are allowed.
  • XAN - Indicates that only the alphanumeric characters are allowed.
  • XANU - Indicates that only the UPPERCASE alphanumeric characters are allowed.
  • XN or N - Indicates that only the numeric input is allowed.
  • F - Uses the Double to parse the content to validate conformance.
  • I - Indicates that only the numeric input that can be converted as integer is allowed.
  • B - Indicates that only numeric input is allowed. This uses {@link BigDecimal} to parse the content to validate conformance.
  • D - Indicates that only date input is allowed. This converts the data using the standard date format of the framework {@link FrameworkConstants.DEFAULT_DATE_FORMAT}
  • X - Indicates that only SWIFT supported characters are allowed.
  • COLL - This attribute value cannot be used directly. This value is used internally within the application to model a collection data type.

mandatory

  • true - Indicates that the input for the specific field is mandatory.
  • false - Indicates that the input for the specific field is not mandatory.

inclusive

Indicates that the special characters provided as the value for this attribute must be considered as valid input.

specialCharacter

Indicates that the special characters provided as the value for this attribute must NOT be considered as valid input.

size

Indicates the value length i.e., the number of characters that can be provided as the input.

multiline

  • true - Indicates that the field must have multiple lines of input.
  • false - Indicates that the field must not have multiple lines of input.



Sample Validation Code:

Code Block
languagexml
<?xml version="1.0" encoding="UTF-8"?>

...


<validate>
<CRWGT_CREAT_

...

WGT>
<fieldType type="XA" mandatory="true" specialCharacter="" size="8" multiline="false">INPUT_PRODUCT</

...

fieldType>
<fieldType type="XA" mandatory="true" specialCharacter="" size="6" multiline="false">INPUT_SUB_PRODUCT</

...

fieldType> 
<fieldType type="XA" mandatory="true" specialCharacter="" size="5" multiline="false">INPUT_FUNCTION_CODE</

...

fieldType>
<fieldType type="XAN" mandatory="true" inclusive=""_ specialCharacter=" " size="40" multiline="false">WIDGET_ID</

...

fieldType>
<fieldType type="XA" mandatory="true" specialCharacter="" size="1" multiline="false">CONTAINER_FLAG</

...

fieldType>
<fieldType type="XA" mandatory="true" inclusive="," size="6" multiline="false">CHANNEL_ID</

...

fieldType>
<collection name="WIDGET_DEF" mandatory="true">

...


<fieldType type="XAN" mandatory="true" inclusive=""_ specialCharacter=" " size="40" multiline="false">WIDGET_ID</

...

fieldType>
<fieldType type="XAN" mandatory="true" inclusive=" "_ size="40" multiline="false">WGT_DISPLAY_NM</

...

fieldType>
<fieldType type="XA" mandatory="true" specialCharacter="" size="1" multiline="false">CONTAINER_FLAG</

...

fieldType>
<fieldType type="XAN" mandatory="true" inclusive="-"_ specialCharacter=" " size="20" multiline="false">BUNDLE_KEY</

...

fieldType>
<fieldType type="XA" mandatory="true" inclusive="," size="6" multiline="false">CHANNEL_ID</

...

fieldType>
<fieldType type="XA" mandatory="true" specialCharacter="" size="1" multiline="false">WGT_RESIZE_IND</

...

fieldType>
<fieldType type="XA" mandatory="true" specialCharacter="" size="1" multiline="false">WIDGET_HEADER_IND</

...

fieldType>
<fieldType type="N" mandatory="false" specialCharacter="" size="38" multiline="false">WGT_HT_IN_PIXELS</

...

fieldType>
<fieldType type="N" mandatory="false" specialCharacter="" size="38" multiline="false">NO_OF_ROWS</

...

fieldType>
<fieldType type="XA" mandatory="true" specialCharacter="" size="1" multiline="false">IN_CATALOGUE_IND</

...

fieldType>
<fieldType type="XAN" mandatory="false" inclusive=""_ specialCharacter=" " size="60" multiline="false">OD_PRODUCT</

...

fieldType>
<fieldType type="XAN" mandatory="false" inclusive=""_ specialCharacter=" " size="60" multiline="false">OD_SUB_PRODUCT</

...

fieldType>
<fieldType type="XAN" mandatory="false" inclusive=""_ specialCharacter=" " size="60" multiline="false">OD_FUNCTION</

...

fieldType>
</collection>
<collection name="WIDGET_BBAR" mandatory="false">

...


<fieldType type="N" mandatory="false" size="3" multiline="false">POSITION</

...

fieldType>
<fieldType type="XAN" mandatory="false" inclusive=""_ size="24" multiline="false">BBAR_BTN_ID</

...

fieldType>
<fieldType type="XAN" mandatory="false" inclusive=" "_ size="25" multiline="false">BTN_DISPLAY_NM</

...

fieldType>
<fieldType type="XA" mandatory="false" specialCharacter="" size="1" multiline="false">BTN_TYPE_IND</

...

fieldType>
</

...

collection>
</CRWGT_CREAT_

...

WGT>
<VSBLTY_IS_MENUID_

...

UNIQUE>
<fieldType type="XA" mandatory="true" specialCharacter="" size="8" multiline="false">INPUT_PRODUCT</

...

fieldType>
<fieldType type="XA" mandatory="true" specialCharacter="" size="9" multiline="false">INPUT_SUB_PRODUCT</

...

fieldType>
<fieldType type="XA" mandatory="true" specialCharacter="" size="9" multiline="false">INPUT_FUNCTION_CODE</

...

fieldType>
<fieldType type="XAN" mandatory="true" inclusive=""_ size="40" multiline="false">ITEM_ID</

...

fieldType>
</VSBLTY_IS_MENUID_

...

UNIQUE>
</

...

validate>