From: Anthony E. <me...@an...> - 2001-11-20 12:03:13
|
> > As far as multiple validators I have checked in a class to CVS called > > FormValidatorGroup. I have not yet added the configuration routines, > > but it is essentially a collection of FormValidators which must all be > > valid for a successful validation. The FormValidatorGroup extends from > > AbstractFormValidator so it can be used in the same place as any other > > FormValidator. > > > > I will add the configuration logic tomorrow. > > Before you go and code up a solution, can we see a snippet of XML of what > the config will look like in this case so we can comment? Just a request. <element name="x"> <validator type="group"> <validator type="class" classname="org.formproc.example.UsernameValidator"/> <validator type="expression"> <pattern>\w{1,}</pattern> </validator> </validator> </element> I will also be moving error messages into the validator level, so that: <validator type="expression"> <pattern></pattern> <error>You did something wrong.</error> </validator> Will become the norm. Sincerely, Anthony Eden |