On 6/27/05, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> 
> Hum reading again, I don't know if I made my self clear :P
> 
> What I like is to display the error that happened for each component.
> Let's say the inputName component was null and I have a validator bean
> defining it as required. how to output a localized message like: Name
> can't be null
> and if that component has another validation let's say minLengh=8, a
> message Name can't have less than 8 chars...


You will have to work a little to get that. Validators records errors in 
form's ValidationDelegate. So actually, you can have more than one error for 
each component. But default tapestry validation records only the first error 
throwing a ValidatorException.
You can do your customized validation and get that working. But I think that 
one error for component is good enough.
Besides, in Tapestry 4.0 there will be a much better validation support, I 
would not lost my time with that.


BTW how do I set more than one bean as my validator on my ValidField 
> component?


Nop, you cant do that. You will have to create some wrapper that have more 
than one validator inside.




Thanks
> 
> Vinicius
> 
> On 6/27/05, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> > Well, how do I set the display-name of a validField to come from a
> > properties resource? Is it possible? Also, how do I set the message
> > for each error (let's say for required)
> >
> > Your field {0} is required and can not be left blank.
> >
> > where {0} is the field name :P
> >
> > Regards
> >
> > Viniciu
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to