Skip to content

Instantly share code, notes, and snippets.

@aimahdi
Created August 17, 2021 16:04
Show Gist options
  • Save aimahdi/16e64ef695cbc797441432e809c32873 to your computer and use it in GitHub Desktop.
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
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