Re: Validator Localization

2003-03-17 Thread Paul Hodgetts
David wrote: I don't think validator supports this but I could be wrong. I believe there's a requirement that forms be defined for the default locale and then for specific locales so that the validator can fall back to the default in case it doesn't find a locale specific formset. Thanks

RE: Validator Localization

2003-03-17 Thread James Turner
Hodgetts [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 1:47 PM To: Struts Users Mailing List Subject: Re: Validator Localization David wrote: I don't think validator supports this but I could be wrong. I believe there's a requirement that forms be defined for the default

Re: Validator Localization

2003-03-17 Thread David Graham
What I'm suggesting is that you define a default formset containing all form fields that need validation. Then define locale specific formsets as needed. If a field isn't in the locale specific formset, I believe the default validation will run. See this bug for more details:

RE: Validator Localization

2003-03-17 Thread Paul Hodgetts
James wrote: As I recall from the last time I messed with the code: The validator first looks for a valid locale which matches down to the variant, then it looks for one that matches to the country, than language, and then finally the base default locale. David wrote: What I'm suggesting

RE: Validator Localization

2003-03-17 Thread David Graham
1. Validation goes through the form field by field. For each field, it looks for a validator definition, and if found runs it on that field. 2. Validation goes through the formset field by field. For each field definition, it runs the validation on the corresponding form field. I was thinking

RE: Validator Localization

2003-03-17 Thread Paul Hodgetts
Thank you, David and James! I must be understanding things better, because my code now works, and I can make predictable changes to it. ;-) Now that I think of it, Validators work just like Tiles, as far as localization. In Tiles, I need all the puts in the default definition, and then I can

Validator Localization

2003-03-16 Thread Paul Hodgetts
I'm trying to localize validations where I have some fields that only appear in certain locales, and therefore only need to be validated under those locales. In Struts in Action, Ted talks about adding attributes to the form tag. But it looks like under the newer Commons Validator, the

Re: Validator Localization

2003-03-16 Thread Paul Hodgetts
In my original example, the form name should be the same in all the formsets. That was just a copy/paste error in the email, but thanks to the couple of folks that pointed that out to me by email. I still can't figure out how to get the validations for the locales to fire. I wrote: I'm trying