org.scalatra.validation
Serializes a validation error into a structure:
{ "message": "the error message", "field": "field_name", "code": "ValidationFail", "args": [] }
You can configure whether or not to include the args. And on the way in it assumes args are JValues. The fields: field, code and args are only added if they have actual data.
Include the code field if an error code is provided
Include the args field when args are provided
Serializes a validation error into a structure:
You can configure whether or not to include the args. And on the way in it assumes args are JValues. The fields: field, code and args are only added if they have actual data.