Answer the question
In order to leave comments, you need to log in
Play scala forms. How to display data in a form that has not passed validation?
Good afternoon. If the form is filled out incorrectly, all fields are reset. I can't figure out how forms handle data when validation fails. There is a code:
postForm.bindFromRequest.fold(
errors =>
Ok(views.html.create(postForm)),
postData => {
Ok(views.html.create(postForm.fill(postData)))
}
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question