That was my idea in one of my previous post, but finally I think it's not a so good idea. Multiply the levels of control is a danger that can make the validation framework not so easy to use. Why not just add support to the converters that could do the job, merely in dealing with the errors that could be generated by converters. Converting a string to a date could generate an error from the converter, and so managed by the validation framework.
1/ Populating the bean HTTP Input Parameters ----converters at work------> Bean populated in Action class If converters can't convert, a null value is set and an error could be stored in order to be used by the validation framework 2/ Validation of the bean - Extract errors from converters - Execute the validation from conf files ...-conversion.xml Richard. -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de Jason Carreira Envoye : jeudi 25 septembre 2003 04:28 A : [EMAIL PROTECTED] Objet : RE: [OS-webwork] Validation Framework details > -----Original Message----- > From: Tracy Snell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 24, 2003 10:17 PM > To: [EMAIL PROTECTED] > Subject: Re: [OS-webwork] Validation Framework details > > > On 9/24/03 8:45 PM, "Jason Carreira" > <[EMAIL PROTECTED]> wrote: > > > The type conversion framework will handle this part... It > sounds like > > we (Patrick and I) need to get together on making these > work together > > better and make it so the type conversion can provide good messages. > > > Wouldn't having the ValidationInterceptor called before the > Params interceptor and having it check against input > parameters solve this? As well as prevent bad values from > ever getting set on the model? In some ways, yes, but it also severely limits what the validation framework can check. For instance, you can immediately not use the VisitorFieldValidator to apply your business objects validations to your populated business object (including ones loaded from the session). You also won't have type converted values, so you can't check things like int ranges or date ranges. Any other object types which use type conversion to create something other than a string cannot be validated. Perhaps a different tack would work... Maybe if it was possible to have MyAction-parameter-validation.xml which apply validations, and we pushed the params onto the stack before we validate, and have a different interceptor which can call the validation framework with the "parameters" context... Jason ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork