Skip to end of metadata
Go to start of metadata

Validation

Validation.js will perform in the browser the same validations of the server side. It requires the locale-specific messages (usually retrieved though ResourcesAction).

The library will validate the contents when the field loses focus, and if failed it will locate the error display component, display the error message and cancel the focus event. When displaying error messages, the field name will be extracted from the surrounding label, if any.

If javascript is off, the server will generate the exact same HTML structure, which makes it possible to set in the server an error message that is later cleared in the browser.

Input prompt

Loom includes its own implementation of the Input Prompt pattern. To use, include prompt.js and the following javascript snippet:

To use InputPrompt and validations at the same time InputPrompt must be created after registering the validations.


‹ Tabs
up
JSP tags ›

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.