nova-flexible-content
nova-flexible-content copied to clipboard
Use field name for validation message instead of attribute
A nova field would use the name of a field for the validation message:
Field::make('Name', 'attribute')->rules('required')
This would return the message Name is required
. The same field used in a flexible layout will return the message attribute is required
, except when the validation language file has a translation for the attribute.
I think this package should use the nova standard of replacing the attribute with the name for error messages as a default, so it is not necessary to add every attribute in the validation config.