aspose file tools
The moose likes Struts and the fly likes struts validation mask Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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>
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: struts validation mask
 
Similar Threads
Converting string to uppercase using Perl5Substitution
Simple File IO Question...Please Help!!!
read and replace text in file
Telephone format validation rule in java
Regular Expresssions