This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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!