File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes xml validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic

xml validator

Ganapathy palanisamy

Joined: May 29, 2008
Posts: 22
I working on validation for the phone no.

now i want to all the land line no also . If i am using the landline i need to allow the thy symbol -
so help to validate special symbols and space in phone no.

please help me to finish it.

view plaincopy to clipboardprint?

1. <field name="txtPhoneNo">
2. <field-validator type="requiredstring">
3. <message key="phoneNo.required" />
4. </field-validator>
5. <field-validator type="regex">
6. <param name="expression">^['',0-9]{12}$</param>
7. <message key="phoneNo.valid" />
8. </field-validator>
10. </field>
I agree. Here's the link:
subject: xml validator
It's not a secret anymore!