nova-flexible-content icon indicating copy to clipboard operation
nova-flexible-content copied to clipboard

Use field name for validation message instead of attribute

Open m-lotze opened this issue 1 year ago • 1 comments

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.

m-lotze avatar Oct 21 '22 11:10 m-lotze