...
Validating Beans with BeanEditForm
If you use the BeanEditForm component it's even easier to validate your beans. The only thing you have to do is to annotate your beans with JSR-303 annotations. If you are migrating from Tapestry's built-in validation mechanism to JSR-303 Bean Validation, you don't have to change your template at all.
...
JSR-303 constraint | Tapestry' JavaScript function |
Tapestry.Validator.maxnumber | |
Tapestry.Validator.minnumber | |
Tapestry.Validator.notnull | |
Tapestry.Validator.isnull | |
Tapestry.Validator.pattern | |
Tapestry.Validator.size | |
@AssertTrue (Since 5.4.5) | |
@AssertFalse (Since 5.4.5) |
Providing own client-side validators
Now let's see how to provide own client-side validation for JSR-303 constraints. Imagine you created the following constraint definition. The server-side implementation of the constraint is implemented by RangeValidator. I suppose you are familiar with JSR-303, so I don’t we won't explain how to implement RangeValidator.
...