Ready to get started?Download WordPress

Plugin Directory

Advanced Custom Fields: Validated Field

The Validated Field add-on for Advanced Custom Fields provides input masking and validation of other field types.


  • Bug Fix: Apply input masking to fields for new posts, not just editing existing ones.


  • Support front end validation using acf_form().
  • Support for WPML, props @gunnyst.
  • Move configuration to WordPress Admin under Custom Fields > Validated Field Settings.
    • Debug - enable debugging, defaults to off.
    • Drafts - enable draft validation, defaults to on.
    • Front End - enable front end validation, defaults to off.
    • Front End Admin CSS - enable acf_form_head() to enqueue an admin theme, defaults to on.
  • Improved SQL for unique queries to support Relationship fields - check both arrays and single IDs.
  • Fix conflicts with ACF client side validation (required fields, etc).
  • Fix reference to $sub_field['read_only'] with $field['read_only'] for jQuery masking, props @johnny_br.


  • Bug Fix: Post Preview fix when WordPress 'click' event triggers a 'submit' before the clicked element can be tracked by the plugin.
  • Added comments to unpacked JavaScript.


  • Critical Bug Fix: Fix compatibility issues with Firefox.

  • Remove debug error_log() statement from v1.2.5.


  • Finish text localization, include es_ES translation.
  • Pack and compress validation javascript.
  • Bug Fix: prevent PHP array index notice for non-repeater fields.
  • Code formatting.


  • Support for globally bypassing Draft/Preview validation by setting ACF_VF_DRAFTS to false.
  • Support for bypassing Draft/Preview validation per field (defaults to validate).
  • Bug fixes: properly hide Draft spinner, cleaned up JavaScript.


  • Properly include plugin version number on JavaScript enqueue for caching and PHP notices.
  • Use minified JavaScript unless ACF_VF_DEBUG is set to true.
  • Tested up to WordPress 3.9.1


  • Show 'Validation Failed' message in header as needed.
  • Mark form as dirty when input element values change.
  • Fix return of $message from field configuration to UI.


  • Support for Repeater Field Validated Fields.
  • Support for debugging with ACF_VF_DEBUG constant.
  • Clean up variable names, more code standardization.
  • Better handling of required fields with validation.

  • Remove debug error_log() statement from v1.1.1.


  • Clean up PHP to WordPress standards.
  • Fix PHP Notice breaking AJAX call.
  • Use defaults to prevent invalid array indexes.
  • Update JavaScript for UI Errors.
  • More localization prep for text.


  • Add Read-only functionality (beta).
  • Use standard ACF error/messaging.
  • Correctly process "preview" clicks, fixes error where the post would be published.
  • Register CSS only in required locations.
  • Properly apply subfield filters for acf/load_value/type=, acf/update_value/type=, acf/format_value/type=, acf/format_value_for_api/type=, acf/load_field/type=, acf/update_field/type=.
  • Tested up to WordPress 3.9.


  • Critical bug fix for selecting Validated Field type.


  • Bug fix $sub_field properties not saving (use acf/create_field_options action).
  • Bug fix multiple Validated Fields in a set - correct to always use unique selectors.
  • Allow for unique query to be run on selected post statuses.
  • Set default statuses included in unique queries with filter of acf_vf/unique_statuses.
  • Remove redundant table wrapper on validated fields.
  • Clean up potential strict PHP warnings.


  • Hide spinner for update if a validation error is encountered.
  • Allow for uniqueness queries to apply to only published or all post statuses.
  • Clean up debugging code writing to the error log for regex validations.


  • Fix javascript error when including ace.js, props @nikademo.
  • Fix "Undefined index" PHP notice, props @ikivanov.


  • Bug fix for unique field values per post_type. Props @ikivanov.


  • Bug fix for editing a validated field. Ensure proper type is selected and UI refresh is triggered. Props @fab4_33.


  • Clean up strict warnings


  • Update for compatibility with Advanced Custom Fields 4+
  • Implement ace.js for syntax highlighting


  • Initial version.

Requires: 3.0 or higher
Compatible up to: 3.9.2
Last Updated: 2014-7-24
Downloads: 2,802


5 stars
5 out of 5 stars


2 of 5 support threads in the last two months have been resolved.

Got something to say? Need help?


Not enough data

1 person says it works.
1 person says it's broken.

0,1,0 100,1,1
100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1
100,1,1 100,1,1
100,2,2 100,1,1 100,2,2 100,1,1 100,1,1