Skip to content

Latest commit

 

History

History
22 lines (12 loc) · 985 Bytes

README.textile

File metadata and controls

22 lines (12 loc) · 985 Bytes

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.