Is there way to use custom validation on an advanced custom field? For example, I might not want a textfield to have a value that starts with certain prefix, or I might want a number field to have a value greater than ‘x’. I might also want to run a regex against a value and return an error if it doesn’t match.

4 Answers
4

There is now, I just posted a plugin that I wrote to do validation for Advanced Custom Fields to the WordPress repository. It lets you do server side validation using either PHP code or regex, jQuery masked inputs, as well as unique value settings.

http://wordpress.org/extend/plugins/validated-field-for-acf/

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *