The validation.xml supports creating FormSets for different locales. The
language used to identify the field for JavaScript validation is also
defined here. I don't think you would need to change anything in the
code, any more than you would if this were coming from the Struts
message resource. The core idea being that language editors could make
all the changes within the XML file without touching the code.
I'm not sure how coding validations in the tags would work, unless
everything can be done within the field's event handler. In any case, I
believe that client-side validation have to be the primary requirement,
with JavaScript as a standard option. Which implies that the validations
need to be coded where the tags and other components can all see them.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/
Jim Richards wrote:
>
> > Here is an excerpt of the validation.xml file (I've
> >attached the full version). The xml file lets you
> >define your validation rules, define global constants,
> >locale constants, and a formset has country, language,
> >and variant just like locale.
>
> My reading of the validation.xml means that form fields
> become fixed, and non-changeable by the code. Which is
> not something that I prefer. I already have code that
> generates forms based on collections that I give it, and
> so something like this just wouldn't work. I'd prefer the
> validation to be in the struts <html:XXX/> tags.
>
> --