Settings API – confused about validation
-
I am writing a very simple plugin that just needs a couple of configuration settings. I’m completely new to WordPress but not PHP development. Having a bit of a struggle understanding some things.
I followed the tutorial at https://ottodestruct.com/blog/2009/wordpress-settings-api-tutorial/ which is perfectly clear and all worked as described first go.
The problem is that I don’t really understand what the validation callback is trying to do. In my book, what’s shown here is not really validation – it’s just blanking out invalid values. Surely, there is some way of generating a helpful error message if the user makes an invalid input?
I did a search but just seem to get pointed back to that tutorial.
Can anybody help?
- The topic ‘Settings API – confused about validation’ is closed to new replies.