innoq / activator-play-roca

Apache License 2.0
3 stars 0 forks source link

Provide error messages to the client in data-on-error attributes #5

Closed dwestheide closed 10 years ago

dwestheide commented 10 years ago

To perform client-side validation when JS is working, the server must provide the error messages that the client can use for each violated constraint in a declarative way. We are using data attributes on the input element for that.

However, it is currently not possible to provide the correct error messages that the server is also using, so we are hardcoding the messages for the client. This is because the form helpers are not flexible enough for this use case.

We must find a way to remove the necessity for hardcoding these error messages in the data attributes, possibly replacing the Play form helpers with something else.