Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on Validation

 
Vineela Devi
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Please tell me is there any way of Enabling/Disabling Validation for a specific Field based on the Locale ?

Validation Framework has to be used for the validations.

Regards,
Vineela
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is not a way to do this with the "out of the box" validation rules. However, the struts Validation framework was created with extension in mind, so the solution would be to create your own validation rule that validates only for certain locales.

Here is a good article on the validation framework. Look in the section entitled "Creating Your Own Validators" for information on how to extend the validation framework.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic