• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regular expressions in mask  RSS feed

 
Grishma Dube
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using struts validator for validating inputs in text box. I've defined a genericMask

<constant>
<constant-name>genericMask</constant-name>
<constant-value>^[a-zA-Z0-9 ]*$</constant-value>
</constant>

an using this mask for validation. I want to add some special chars such as -/# to this mask. But whenever I'm adding this, the validator is not validating properly and giving me invalid input validation error on each field using genericMask.

Can someone help me in resolving this problem.

TIA

Grishma
 
Grishma Dube
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it........thanx
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!