Provide extra validation tag for ajax validation and client side validation based on the server annotations
Java JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
conf
documentation/manual
public
samples-and-tests/sample-app
src
.gitignore
README.textile
build.xml

README.textile

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.