adminarchitect / core

AdminArchitect - Active Admin for Laravel
http://adminarchitect.com
MIT License
211 stars 66 forks source link

Problem with validation of translatable fields #18

Closed YulKard closed 6 years ago

YulKard commented 6 years ago

There was a problem with the validation of multilingual fields. If you do not fill in the fields, but click save, an error occurs http://joxi.ru/l2Z6a6auwP07G2. If you add a validation rule http://joxi.ru/LmGDXDXSePMlq2, even if you fill in all the fields, validation still works http://joxi.ru/J2blMlMuX73g4r.

Tell me, what could be the reason. Or validation for multilingual fields does not work. Thank you in advance.

http://joxi.ru/l2Z6a6auwP07G2

endihunter commented 6 years ago

you're passing a multidimensional array, so in your case validation rules might be something like:

return [ "translatable.*.title" => "!!!validation rules!!!" ]

YulKard commented 6 years ago

Thank you! It is really helped!!!