Skip to content

Provide extra validation tag for ajax validation and client side validation based on the server annotations

Notifications You must be signed in to change notification settings

pepite/Play--validation

Repository files navigation

Ajax validation for the Play! framework

This module provides handy method to do validation.

Example

View

code
#{extends ‘main.html’ /}
#{set title:‘Home’ /}

<form action="@{submitStep}" method="post">
<input type="text" name="cart.fullName" />#{validate name:‘cart.fullName’/}
</form>

The #{validate /} tag perform an ajax request and display a validation error in case of validation failure. The tag has the following attributes: name and class. Id will be added really soon.

No extra or special annotation is required. This plugin uses the “standard” Play! framework validation annotation.

Limitation: Cart.Item.name isn’t currently supported.

Client validation

Not yet implemented but coming soon. The idea is to publish the meta information about validation at render time (or maybe an extra request?).
The client side uses the server side validation annotations.

About

Provide extra validation tag for ajax validation and client side validation based on the server annotations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published