Custom gutenberg errors for post validations
-
Given the following filter
rest_pre_insert_{post_type}here: https://pastebin.com/raw/JQ1JY5qV I get the expected output of this for all foobar post types:{
“code”: “invalid_post”,
“message”: “Testing error display on gutenberg.”,
“data”: {
“status”: 400
}
}However in WordPress 6.6.1 the editor will not display the above error message. The error remains “Updating Failed” when I am expecting “Updating Failed. Testing Error display in gutenberg”.
If this is not supposed to work, then how else can I pass custom errors when saving posts to the gutenberg editor for custom validations I want to run.
The topic ‘Custom gutenberg errors for post validations’ is closed to new replies.