Support » Plugin: Advanced Custom Fields: Validated Field » Undefined index message

  • Resolved aboother



    I have just updated to version 1.2.1 of the plugin. It works great except I get the following two messages at the top of each page:

    Notice: Undefined index: version in /Users/adamboother/workspace/isis/src/wp-content/plugins/validated-field-for-acf/validated_field_v4.php on line 683

    Notice: Undefined index: version in /Users/adamboother/workspace/isis/src/wp-content/plugins/validated-field-for-acf/validated_field_v4.php on line 684

    I have also noticed my custom message does not show in the red bubble which appears when you fail validation. E.g. I have the following validation:

    if(strlen($value) < 10) {
        $message = "Test alert";
        return false;
    } else {
         return true;

    but my custom message of ‘Test alert’ does not show when I enter less than 10 characters in the field, instead I just get an empty small red bubble.


Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author doublesharp


    @aboother Version 1.2.2 fixes the alerts that you were seeing – it should now be properly associating the plugin version with the javascript includes.

    Since you are getting lots of PHP notices, my guess is that something similar is messing up the JavaScript. After you update, can you use the developer tools in Chrome to get the request/response for the AJAX? This will work best if you set ACF_VF_DEBUG to true in wp-config.php so that it doesn’t use the minified version of the javascript and will ask you if you want to submit the form on success.

    define( 'ACF_VF_DEBUG', true );

    @doublesharp please find that info below:

    Form data:



    <b>Notice</b>: Unefined offset: 3 in <b>…/validated_field_v4.php</b> on line <b>142</b>
    [{id:fields[field_536226330aa1f], message:Test alert, valid:false}]

    0: {id:fields[field_536226330aa1f], message:Test alert, valid:false}
    id: “fields[field_536226330aa1f]”
    message: “Test alert”
    valid: false

    The PHP errors have now gone, but I still don’t get my custom validation message showing in the red bubble which I assume is down to these errors above?


    Plugin Author doublesharp


    @aboother – That is indeed the issue. Not sure why my system isn’t reporting the warnings/notices like yours, but I think I got them all in version 1.2.4. If you are still having issues with that version send me a note and I’ll have you try a beta version before pushing it out to everyone. Thanks!

    Plugin Author doublesharp


    Errr… I mean version Creating version tags does not always go as expected. Sigh.

    @doublesharp – I can imagine that is the case with version tags!

    You’ll be glad to hear that all works a treat now, thanks very much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Undefined index message’ is closed to new replies.