It's not a secret anymore!
The moose likes Struts and the fly likes custom validators Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "custom validators " Watch "custom validators " New topic

custom validators

Web 4.0

Joined: Sep 15, 2007
Posts: 1
I created a custom validator from for all the fields in the page

where should i specify the path so that the validation gets done

Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
put the [ActionClassName]-validation.xml in the package where you put your action class, then in struts.xml, let your package extends strut-default. All the input value will pass through the validation intercepter, and so is the validation done. For more information, please refer to
It is sorta covered in the JavaRanch Style Guide.
subject: custom validators
It's not a secret anymore!