phone ^(?(d{3}))?[-| ]?(d{3})[ | ]?(d{4})$ zip ^d{5}(-d{4})?$ This fragment includes two constants, phoneand zip, although you can include as many as you need. These constants are available to the elements within the formset section. You can reuse them many times within the formset simply by referring to them by name. This is best illustrated with an example. Example 11-1 shows a simple validation.xml file. Example 11-1. A simple validation.xml file
phone ^(?(d{3}))?[-| ]?(d{3})[ | ]?(d{4})$
In Example 11-1, the phoneconstant that’s declared in the global section is used in the var element to help validate the phone property. The formset element can contain two child elements, constantand form. The constant element has the same format as the one in the global section. It can be present zero or more times. The formelement can be present one or more times within the formset element:
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.
This entry was posted
on Tuesday, August 21st, 2007 at 7:06 pm and is filed under Domain.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.