This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mask validation not working

 
Pranav Sharma
Ranch Hand
Posts: 258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My validator.xml contains simple validations for required and mask.

The 'required' works but when I take it off and leave only mask this does not get validated.

Can anyone see why.




my error in the resources file is :
errors.invalid={0} is invalid.
 
Pranav Sharma
Ranch Hand
Posts: 258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read on the struts website that the validator needs a ^ and $ struts 1.1 onwards, however this does not work either

<var-value>^[a-zA-Z]*$</var-value>
 
BadalDeepali Garg
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi think if u try this
<var>
<var-name>mask</var-name>
<var-value>[a-zA-Z]+</var-value>
</var>
It may wrok for you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic