Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MM/YY date format within validator.xml

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

inside validator.xml,
is it possible to use the MM/YY format with the date validator ?

The documentation gives examples with MM/dd/yyyy
http://struts.apache.org/userGuide/dev_validator.html

but not with MM/YY.
I tried this:
<field property="ExpirationDate" depends="required, date">
<arg0 key="ExpirationDate.label.date" />
<var><var-name>datePatternStrict</var-name><var-value>MM/yy</var-value></var>
</field>

Validation is not working.
Any idea please ?
Thanks
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!