--- Joe Germuska <[EMAIL PROTECTED]> wrote: > At 3:16 PM -0400 5/20/04, Don Brown wrote: > >With the validator as a constant source of hangups, I'm working on > >becoming more familiar with how it works. I have some questions, > >perhaps rather basic and obvious: > > > >Why does Struts perform all its validation with o.a.s.v.CheckFields? > >It seems it duplicates a most of commons-validator's, well, > >validators. Why not process the ValidationResults after > >validator.validate() to create the necessary ActionMessages and use > >commons-validator's existing validators? > > I suspect this is just a legacy of Validator being factored out of > Struts. > > >This might more just validator specific, but why is there no > >facility to provide the validator an already existing instance of a > >Validator (or if there is, where is it)? It seems the only options > >are to create a Validator with static methods or a no arg > >constructor. I think it would be valuable to let Spring manage more > >complex validators that rely on business objects, and re-use those > >validators with Struts. Or, perhaps you want a method on one of > >your existing business objects to be called for validation. > > I suspect this also is mostly history, although I can't claim to be > an expert about validator. I know that around 1.0, I tried to work > my way through the code and found it very confusing. I think it's > just the way it has evolved.
Rob and I have been working on cleaning up commons-validator since then. It's much better than it was but still has room for improvement. One area that has always confused me is how it passes back results in a ValidationResults object. It seems like that could be cleaned up a bit. If you're interested in validator we would very much appreciate more contributors :-). David > > Joe __________________________________ Do you Yahoo!? Yahoo! Domains – Claim yours for only $14.70/year http://smallbusiness.promotions.yahoo.com/offer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]