Created
August 17, 2021 16:04
-
-
Save aimahdi/16e64ef695cbc797441432e809c32873 to your computer and use it in GitHub Desktop.
The code snippet will check if both email field are matched or not
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 characters
add_filter('fluentform_validate_input_item_input_email', function($errorMessage, $field, $formData, $fields, $form) { | |
$target_form_id = 8; | |
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