フォーム ヘルパーで問題が発生しています。ビューに渡す前にフォームにエラーを追加したいのですが、次のエラーが発生します。
value withGlobalError is not a member of play.api.data.Form[(String, String)]
私が持っているコードは次のとおりです。
def loginForm = Form(
tuple (
"email" -> nonEmptyText,
"password" -> nonEmptyText
)
)
def asignIn = Action {
implicit request =>
loginForm.bindFromRequest.fold (
formWithErrors => Ok(views.html.login(formWithErrors.withGlobalError("Invalid username or password")),
user => authenticationStep(user)(request)
)
}