On Fri, Oct 4, 2013 at 9:25 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote:
> On Fri, 04 Oct 2013 03:51:59 -0300, Ilya Obshadko <ilya.obsha...@gmail.com> > wrote: > > Hello, >> > > Hi! > > > I have checked http://wiki.apache.org/**tapestry/** >> Tapestry5HowToAddValidators<http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators> >> , >> it's pretty clear how to do that, but I don't have any idea how do I >> inject actual component data into validator when needed. >> > > Which data? From the component being validated? It comes in the second > parameter of the Validator.validate() method. Not actually. From component containing the field being validated and actually defining validation context. Suppose you have several input fields where you enter rankings in range between 1 and number of items being ranked. So if you have 10 items, values from 1 to 10 are valid, while 11 is invalid. I want to have this checked at validator level both on server and client side. > > > -- > Thiago H. de Paula Figueiredo > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org> > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Ilya Obshadko