How to validate phone number in MDM using rulebase.

How to validate phone number in MDM using rulebase.

book

Article ID: KB0089373

calendar_today

Updated On:

Products Versions
TIBCO MDM Studio -
Not Applicable -

Description

Description:
While using MDM, it maybe necessary to write a validation to check if the format in the phone number format is correct. This can be done using the rulebase in MDM. The following validation checks if the phone number entered is in format (123-123-1234). (Supplied in the attachment (Filename: phone_format_validation.txt)).

<constraint>

<name>CHECK_phone format</name>

<description>CHECK_phone format</description>

<usefor>

<var>a</var>

</usefor>

<action>

<check>

<explanation>a vaildation.</explanation>

<match>

<var/>

<const type="string">/^[0-9][0-9][0-9][\-][0-9][0-9][0-9][\-][0-9][0-9][0-9][0-9]$/</const>

</match>

</check>

</action>

</constraint>

Resolution

To use a rulebase to check the validation of a phone number, use the rulebase in MDM. See the following validation where it checks if the phone number entered is in the format (123-123-1234).

<constraint>

<name>CHECK_phone format</name>

<description>CHECK_phone format</description>

<usefor>

<var>a</var>

</usefor>

<action>

<check>

<explanation>a vaildation.</explanation>

<match>

<var/>

<const type="string">/^[0-9][0-9][0-9][\-][0-9][0-9][0-9][\-][0-9][0-9][0-9][0-9]$/</const>

</match>

</check>

</action>

</constraint>

Issue/Introduction

How to validate phone number in MDM using rulebase.

Additional Information

attached catalog validation

Attachments

How to validate phone number in MDM using rulebase. get_app