laravel-rest-api icon indicating copy to clipboard operation
laravel-rest-api copied to clipboard

Translate attributes validation rules

Open Samoht70 opened this issue 2 years ago • 1 comments

Description

I use laravel's translation layer. I've been able to translate quite a few texts without any problem, except for the attributes for the rules. Laravel lets you translate these attributes in the validations.php language file by creating an attributes array. Except that for Lomkit validation errors, the attributes are formed like this: mutate.*.email with * the object index in the request body. It's very difficult to know at which index the error on our attribute is located in the validations.php file.

Samoht70 avatar Mar 12 '24 20:03 Samoht70

This is related to Laravel validation feature, might need to do a change request on Laravel

GautierDele avatar Mar 13 '24 07:03 GautierDele