statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
30 stars 1 forks source link

Make the validation error message 'The data was invalid' customizable or clearer #1004

Closed SamuelFerracini closed 1 year ago

SamuelFerracini commented 1 year ago

It would be wonderful if we could modify the default error message for validation to provide more informative feedback. I have implemented a custom rule using regular expressions to identify invalid characters in the entry's content. However, when this rule fails, the message "The data was invalid" raised by Statamic but this does not adequately explain the issue. Thank you in advance.

jasonvarga commented 1 year ago

That's the validation message in general. You should also see an inline error message on the actual field itself which would provide more context.

CleanShot 2023-06-20 at 09 46 28