GeeCON Prague 2014*
The moose likes Struts and the fly likes struts validation mask Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts validation mask" Watch "struts validation mask" New topic
Author

struts validation mask

ivin jacob
Greenhorn

Joined: Apr 05, 2006
Posts: 23
Hi all,

I am not much aware about regular expressions .

I need to restrict user input of a text box to alphabets only

but it may contain space or a dot in beteween lettes .


So how do i write the <var-value> in the validation.xml



Also can anyone paste me a good link where i can study all the regular expressions

Please help.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm not much of a regex expert, either, but here's a link to a good beginning article on regex:

http://www.developer.com/lang/article.php/10924_3330231_1


Merrill
Consultant, Sima Solutions
Ish Ash
Greenhorn

Joined: Jul 30, 2006
Posts: 3
Try this, it should work

<var-value>^[a-zA-Z\s.]*$</var-value>
 
GeeCON Prague 2014
 
subject: struts validation mask