[wp-trac] [WordPress Trac] #54003: How to Display Error in my WordPress customizer api?
WordPress Trac
noreply at wordpress.org
Wed Aug 25 21:54:02 UTC 2021
#54003: How to Display Error in my WordPress customizer api?
-----------------------------+----------------------
Reporter: khawaga | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Customize | Version:
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-----------------------------+----------------------
Changes (by dlh):
* status: new => closed
* resolution: => invalid
* component: General => Customize
* milestone: Awaiting Review =>
Comment:
Hi @khawaga, and welcome to WordPress Trac!
To add custom messages for validation errors, be sure that the
`validate_callback` adds error messages to the `WP_Error` object passed to
it. For more details, [https://make.wordpress.org/core/2016/07/05
/customizer-apis-in-4-6-for-setting-validation-and-notifications/ see the
dev note] written when the validation API was added to core.
Please also note that support for custom development isn't available here
in Trac. If you have more questions about your project,
[https://wordpress.org/support/forum/wp-advanced/ you'll be able to find
help in the support forums].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54003#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list