Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Register Setting validation not working. #100

Open
devanddhiraj opened this issue Oct 17, 2022 · 1 comment
Open

Register Setting validation not working. #100

devanddhiraj opened this issue Oct 17, 2022 · 1 comment

Comments

@devanddhiraj
Copy link

register_setting validation not working (validation function does not called)
register_setting( $this->parent->_token . '_settings', $option_name, $validation);

@rafasashi
Copy link
Contributor

Good point!

There is no such thing as $validation parameter in the first place.

According to the doc it should be passed into $args['sanitize_callback']:

https://developer.wordpress.org/reference/functions/register_setting/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants