On Thu, 15 Sep 2016 11:20:57 -0300, Nathan Quirynen <nat...@pensionarchitects.be> wrote:

Hi,


Hi!

@Validate("regexp="+SOME_REGEXP)
@InjectComponent
private Field someField;
But this does not seem to work?

This isn't supposed to work. You should annotate the field or getter whose value is being validated, not the form field component. What about adding validate="regexp:[\\d]{1-2}", for example, to the <t:textfield> directly?

Is there any other way to add validators to a field programatically when you have no access to the property declarations? I could do all validation myself in the onValidate event, but this does not seem optimal.

See above.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to