Support

Account

Home Forums Front-end Issues Validation doesn't work

Unread

Validation doesn't work

  • add_filter(‘acf/validate_value/name=source_code’, ‘Validate_sourcecode’, 10, 4);
    function Validate_sourcecode($valid, $value, $field, $input) {
    // field key of the field you want to validate against
    $sc = ‘field_5f62052ee929f’;
    if ($value != $_POST[‘acf’][$sc]) {
    $valid = ‘Code does not match’;
    }
    return $valid;
    }

    The validation does not work in registration system.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.