Created
September 24, 2022 09:17
-
-
Save annuman97/caaf35b62fe26ce6fd3586319ffa786c to your computer and use it in GitHub Desktop.
This file contains 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 characters
add_filter('fluentform_validate_input_item_input_email', function($errorMessage, $field, $formData, $fields, $form) { | |
$target_id = [59,60]; | |
$target_form_id = 0; | |
foreach($target_id as $id){ | |
if($form->id == $id){ | |
$target_form_id = $id; | |
} | |
} | |
if($form->id != $target_form_id ) { | |
return $errorMessage ; | |
} | |
if( $formData['email'] != $formData['email_1'] ){ | |
$errorMessage= ['Error! Email does not match']; | |
} | |
return $errorMessage; | |
}, 10, 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment