You can use the regex attribute of the <bind> rule to select a regular
expression to match your format. Here is an example I made up. You can find
excellent regular expression examples at http://regexlib.com/
<xr:rules xmlns:xr="http://www.xrules.org/2003/11">
<xr:ruleset context="/Contact">
<xr:bind target="Phone" regex="'^[+]?\d{1,3}-\d{2}-\d{1,7}$'" />
<xr:bind target="Email" regex="'\w+@\w+.(com|org|net)'" />
<xr:bind target="ZipCode" regex="'\d{3}-\d{3}-[A-Z]{3}-\d{3}[A-Z]'" />
</xr:ruleset>
</xr:rules>
Regards,
Waleed
-----Original Message-----
From: radobject [mailto:radobject@...]
Sent: Saturday, January 13, 2007 6:03 PM
To: xrules@yahoogroups.com
Subject: How can control data format with XRule?
Hi,
I have a question about How I can control email,phone,... format with
XRule.
<Contact>
<Phone>+98-21-2222222</phone>
<Email>Radobject@...</Email>
<ZipCode>123-456-ARC-555A</ZipCode>
</Contact>
Best regards