outl1ne / nova-translatable

A Laravel Nova package that allows you to make any input field translatable.
MIT License
199 stars 56 forks source link

fix: use validation key instead of attribute as validation key #97

Closed RobertoNegro closed 1 year ago

RobertoNegro commented 1 year ago

Hello,

I'm working on a custom Nova field, and I'm using as validationKey something different than the field's attribute.

nova-translatable is incompatible with my custom field because when creating the nested fields for each locale, it replaces the field.validationKey with the field.attribute.

I know that this is an edge-case since usually the field.validationKey is equal to the field.attribute, but in general I think it should be more correct to append the locale.key to the validationKey when changing the validationKey.

Thanks, Roberto

Tarpsvo commented 1 year ago

Thanks for the fix PR! It's now released in version 2.2.0. :)