• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts validation mask

 
ivin jacob
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ish Ash
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this, it should work

<var-value>^[a-zA-Z\s.]*$</var-value>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic