AjaxValidation demo

This page displays a ajaxValidation on a textfield containing already a Tapestry validation.
Both validations can be stacked.
In this example, the Tapestry validation force to minlength=5, the ajaxValidation force to 7 maximum characters.

In Action
Login :

TML Source code

			Login : <t:textfield t:id="login" value="loginValue"

Java code

    private String loginValue;

    @OnEvent(value = ExanpeEventConstants.AJAXVALIDATION_EVENT, component = "login")
    public AjaxValidationResult validateLogin(String login)
        if (login != null && login.length() < 7)
            return AjaxValidationResult.TRUE;

        return AjaxValidationResult.FALSE;