no.tornado.web.html.validator.package-info Maven / Gradle / Ivy
Show all versions of web Show documentation
/**
* Form Validators
*
* Validators are added to {@link no.tornado.web.html.FormElement form elements} by the
* {@link no.tornado.web.html.FormElement#validator(Validator)} method.
*
* A Validator must implement the {@link no.tornado.web.html.validator.Validator Validator} interface and should extend
* {@link no.tornado.web.resources.Resource Resource} to provide internationalized error messages. This is also important
* to make it easy for users to customize the error messages.
*
* Validation is performed by the framework when {@link no.tornado.web.html.Form#load(Object, boolean) Form#load} is called
* during a form POST. The {@link no.tornado.web.html.decorator.Decorator Decorator} connected to the form will be notified when
* validation fails in the {@link no.tornado.web.html.decorator.Decorator#validationFailed(no.tornado.web.html.FormElement, no.tornado.web.exceptions.ValidationFailed) Decorator#validationFailed}
* method, and to clean up validation messages in the {@link no.tornado.web.html.decorator.Decorator#clearValidationMessages(no.tornado.web.html.FormElement) Decorator#clearValidationMessages} method.
*
* The framework supplied Validators have internationalized error messages in the package resource bundles (Resource_lang.properties)
*
* @see no.tornado.web.engine.AbstractLifeCycleListener#executeVersionedForm(Class, String, Long, String) PageFilter#executeVersionedForm
* @see no.tornado.web.engine.AbstractLifeCycleListener#executeFormElementEvent(Class, String, Long, String, String) PageFilter#executeFormElementEvent
*/
package no.tornado.web.html.validator;