First of all I want to state that I think that the Play documentation for 2.0 is really, really bad.
I\'m looking for a way to place a validation error underneath a HTML
The answer from 2manyprojects works very well but you can do the same thing in the controller. It all depends on your preference and style.
public static Result save() { Form boundForm = form.bindFromRequest(); if (boundForm.hasErrors()) { String errorMsg = ""; java.util.Map> errorsAll = boundForm.errors(); for (String field : errorsAll.keySet()) { errorMsg += field + " "; for (ValidationError error : errorsAll.get(field)) { errorMsg += error.message() + ", "; } } flash("error", "Please correct the following errors: " + errorMsg); return badRequest(detail.render(boundForm)); }