Properly format API validation errors
Validation errors returned by the api are complex to handle from js clients.
They simple string messages using newlines and *
as separators. users have to use regex patterns to retrieve the field in error and the message.
It would be a lot easier to return directly a JSON from the API.