All fields in tapestry have a FieldValidator property

    @Parameter(defaultPrefix = BindingConstants.VALIDATE)
    private FieldValidator<Object> validate;

This will either be an instance of FieldValidatorImpl for a single
validator or CompositeFieldValidator if there is more than one validator on
a field.

There is no public API to get the list of validators for a field and it
will get messy if you try to inspect the FieldValidator using reflection. I
would approach this by overriding or decorating the FieldValidatorSource
service to store the information you want in the environment. Take a look
at FieldValidatorSourceImpl for inspiration

http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.html
http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/services/Environment.html

Reply via email to