Open fpietrosanti opened 2 years ago
this is actually a backend problem. the a field in payload is invalid, the backend generate a localized error message with those patterns
error.empty_mandatory_field=Mandatory field: {0}
error.empty_mandatory_field_coalesce=At least one of the following fields is mandatory: {0}
error.invalid_field=Invalid field: {0}
but the name of the invalid field is taken from the JSON definition of the payload. the backend itself can't know what label is shown in the app for the invalid field, and even if it does, we must localize all the fields of all the jsons objects defined in the swagger. this can be done with no technical issue, but is will require some effort.
When the application, in english language, do provide error due to invalid phone number it results in inconsistencies:
The errors should be contextual to the application language.