Created
December 5, 2019 12:08
-
-
Save webdevs-pro/48fd663d7409dd1b4fcbabbba97d32e5 to your computer and use it in GitHub Desktop.
Revisions
-
webdevs-pro created this gist
Dec 5, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <?php add_filter('acf/validate_value/name=user_password_confirm', 'my_validated_password_filter', 10, 4); function my_validated_password_filter($valid, $value, $field, $input) { if (!$valid) { return $valid; } // field key of the field you want to validate against $password_field = 'field_5de8dff728aa2'; if ($value != $_POST['acf'][$password_field]) { $valid = 'Does Not Match Password'; } return $valid; }