Changeset 3260773
- Timestamp:
- 03/24/2025 12:07:35 PM (12 months ago)
- Location:
- data-soap-validation/trunk
- Files:
-
- 8 edited
-
datasoap-validation.php (modified) (1 diff)
-
includes/dsvcf7-validation.php (modified) (1 diff)
-
includes/dsvep-validation.php (modified) (1 diff)
-
includes/dsvgf-validation.php (modified) (1 diff)
-
includes/dsvwc-validation.php (modified) (1 diff)
-
includes/dsvwpf-validation.php (modified) (1 diff)
-
plugin_interface.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
data-soap-validation/trunk/datasoap-validation.php
r2818859 r3260773 5 5 Description: This plugin integrates Data Soap telephone and and email validation in WooCommerce, Gravity Forms, WPForms, Elementor Pro and Contact Form 7 6 6 Author: DataSoap 7 Version: 1.0. 67 Version: 1.0.7 8 8 WC requires at least: 2.2.3 9 WC tested up to: 6. 0.19 WC tested up to: 6.7.2 10 10 */ 11 11 12 /* Copyright 202 2Liquid11 Data Ltd. All Rights Reserved.12 /* Copyright 2025 Liquid11 Data Ltd. All Rights Reserved. 13 13 */ 14 14 -
data-soap-validation/trunk/includes/dsvcf7-validation.php
r2797046 r3260773 41 41 } 42 42 43 if ($apiResult['valid'] == false || $apiResult['valid'] == true && isset($apiResult['errors'])) 44 $result->invalidate( $tag, "Please enter a valid phone number" ); 43 if ($apiResult['valid'] == false || ($apiResult['valid'] == true && isset($apiResult['errors']))) { 44 $relevantErrors = array_filter($apiResult['errors'], function ($error) { 45 return $error['code'] != '-98'; 46 }); 47 48 if (!empty($relevantErrors)) { 49 $result->invalidate($tag, "Please enter a valid phone number"); 50 } 51 } 45 52 } 46 53 else{ -
data-soap-validation/trunk/includes/dsvep-validation.php
r2797046 r3260773 29 29 } 30 30 31 if ($apiResult['valid'] == false || $apiResult['valid'] == true && isset($apiResult['errors'])) 32 $ajax_handler->add_error( $field['id'], 'Please enter a valid phone number' ); 31 if ($apiResult['valid'] == false || ($apiResult['valid'] == true && isset($apiResult['errors']))) { 32 $relevantErrors = array_filter($apiResult['errors'], function ($error) { 33 return $error['code'] != '-98'; 34 }); 35 36 if (!empty($relevantErrors)) { 37 $ajax_handler->add_error($field['id'], 'Please enter a valid phone number'); 38 } 39 } 33 40 } 34 41 else{ -
data-soap-validation/trunk/includes/dsvgf-validation.php
r2797046 r3260773 1 1 <?php 2 2 3 if (get_option('dsv_telephone_validation')) 4 add_filter( 'gform_field_validation', 'validate_telephone_datasoap_gf', 10, 4);3 if (get_option('dsv_telephone_validation')) 4 add_filter('gform_field_validation', 'validate_telephone_datasoap_gf', 10, 4); 5 5 6 function validate_telephone_datasoap_gf( $result, $value, $form, $field ) { 7 $current_page = rgpost( 'gform_source_page_number_' . $form['id'] ) ? rgpost( 'gform_source_page_number_' . $form['id'] ) : 1; 8 if ( $field->get_input_type() === 'phone' && $result['is_valid'] && $value != '' && $field->pageNumber == $current_page) { 9 10 $params = array( 11 'lookup' => $value, 12 'checks' => array ( 13 'Auto' 14 ) 15 ); 16 17 $dsv_token = get_option('dsv_token'); 6 function validate_telephone_datasoap_gf($result, $value, $form, $field) 7 { 8 $current_page = rgpost('gform_source_page_number_' . $form['id']) ? rgpost('gform_source_page_number_' . $form['id']) : 1; 9 if ($field->get_input_type() === 'phone' && $result['is_valid'] && $value != '' && $field->pageNumber == $current_page) { 18 10 19 if($dsv_token != "") { 20 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 21 22 if(!isset($apiResult['valid'])){ 23 $result['is_valid'] = false; 24 $result['message'] = "Please enter a valid phone number"; 25 return $result; 26 } 11 $params = array( 12 'lookup' => $value, 13 'checks' => array( 14 'Auto' 15 ) 16 ); 27 17 28 if ($apiResult['valid'] == false || $apiResult['valid'] == true && isset($apiResult['errors'])) { 29 $result['is_valid'] = false; 30 $result['message'] = "Please enter a valid phone number"; 31 } 32 } 33 else{ 34 $params = array( 35 'lookup' => $value, 36 'checks' => array ( 37 'Syntax' 38 ) 39 ); 40 41 $apiResult = sendDataSoapValidationRequest($params, ""); 18 $dsv_token = get_option('dsv_token'); 42 19 43 if(!isset($apiResult['valid'])){ 44 $result['is_valid'] = false; 45 $result['message'] = "Please enter a valid phone number"; 46 return $result; 47 } 20 if ($dsv_token != "") { 21 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 48 22 49 if ($apiResult['valid'] == false && !isset($apiResult['errors'])) 50 $result['is_valid'] = false; 51 $result['message'] = "Please enter a valid phone number"; 52 } 53 } 54 return $result; 23 if (!isset($apiResult['valid'])) { 24 $result['is_valid'] = false; 25 $result['message'] = "Please enter a valid phone number"; 26 return $result; 27 } 28 29 if ($apiResult['valid'] == false || ($apiResult['valid'] == true && isset($apiResult['errors']))) { 30 // Filter out the "Insufficient credit" error (-98) 31 $relevantErrors = array_filter($apiResult['errors'], function ($error) { 32 return $error['code'] != '-98'; 33 }); 34 35 if (!empty($relevantErrors)) { 36 $result['is_valid'] = false; 37 $result['message'] = "Please enter a valid phone number"; 38 } 39 } 40 } else { 41 $params = array( 42 'lookup' => $value, 43 'checks' => array( 44 'Syntax' 45 ) 46 ); 47 48 $apiResult = sendDataSoapValidationRequest($params, ""); 49 50 if (!isset($apiResult['valid'])) { 51 $result['is_valid'] = false; 52 $result['message'] = "Please enter a valid phone number"; 53 return $result; 54 } 55 56 if ($apiResult['valid'] == false && !isset($apiResult['errors'])) 57 $result['is_valid'] = false; 58 $result['message'] = "Please enter a valid phone number"; 59 } 60 } 61 return $result; 55 62 } 56 63 57 64 if (get_option('dsv_email_validation')) 58 add_filter( 'gform_field_validation', 'validate_email_address_datasoap_gf', 10, 4);65 add_filter('gform_field_validation', 'validate_email_address_datasoap_gf', 10, 4); 59 66 60 function validate_email_address_datasoap_gf( $result, $value, $form, $field ) { 61 $current_page = rgpost( 'gform_source_page_number_' . $form['id'] ) ? rgpost( 'gform_source_page_number_' . $form['id'] ) : 1; 62 if ( $field->get_input_type() === 'email' && $result['is_valid'] && $value != '' && $field->pageNumber == $current_page) { 67 function validate_email_address_datasoap_gf($result, $value, $form, $field) 68 { 69 $current_page = rgpost('gform_source_page_number_' . $form['id']) ? rgpost('gform_source_page_number_' . $form['id']) : 1; 70 if ($field->get_input_type() === 'email' && $result['is_valid'] && $value != '' && $field->pageNumber == $current_page) { 63 71 64 $params = array( 65 'lookup' => $value, 66 'checks' => array ( 67 'Email' 68 ) 69 ); 70 71 $dsv_token = get_option('dsv_token'); 72 $params = array( 73 'lookup' => $value, 74 'checks' => array( 75 'Email' 76 ) 77 ); 72 78 73 if($dsv_token != "") { 74 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 75 76 if(!isset($apiResult['valid'])){ 77 $result['is_valid'] = false; 78 $result['message'] = "Please enter a valid email address"; 79 return $result; 80 } 79 $dsv_token = get_option('dsv_token'); 81 80 82 if ($apiResult['valid'] == false) { 83 $result['is_valid'] = false; 84 $result['message'] = "Please enter a valid email address"; 85 } 86 } 87 else{ 88 $params = array( 89 'lookup' => $value, 90 'checks' => array ( 91 'Syntax' 92 ) 93 ); 94 95 $apiResult = sendDataSoapValidationRequest($params, ""); 81 if ($dsv_token != "") { 82 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 96 83 97 if(!isset($apiResult['valid'])){98 $result['is_valid'] = false;99 $result['message'] = "Please enter a valid email address";100 return $result;101 }84 if (!isset($apiResult['valid'])) { 85 $result['is_valid'] = false; 86 $result['message'] = "Please enter a valid email address"; 87 return $result; 88 } 102 89 103 if ($apiResult['valid'] == false) { 104 $result['is_valid'] = false; 105 $result['message'] = "Please enter a valid email address"; 106 } 107 } 90 if ($apiResult['valid'] == false) { 91 $result['is_valid'] = false; 92 $result['message'] = "Please enter a valid email address"; 93 } 94 } else { 95 $params = array( 96 'lookup' => $value, 97 'checks' => array( 98 'Syntax' 99 ) 100 ); 108 101 109 return $result; 110 } 102 $apiResult = sendDataSoapValidationRequest($params, ""); 103 104 if (!isset($apiResult['valid'])) { 105 $result['is_valid'] = false; 106 $result['message'] = "Please enter a valid email address"; 107 return $result; 108 } 109 110 if ($apiResult['valid'] == false) { 111 $result['is_valid'] = false; 112 $result['message'] = "Please enter a valid email address"; 113 } 114 } 115 116 return $result; 117 } 111 118 } 112 ?> -
data-soap-validation/trunk/includes/dsvwc-validation.php
r2797046 r3260773 3 3 add_action('woocommerce_checkout_process', 'dsvwc_validate'); 4 4 5 function dsvwc_validate(){ 5 function dsvwc_validate() 6 { 6 7 7 // telephone validation8 if(get_option('dsv_telephone_validation'))9 validate_telephone_datasoap_number_wc('billing_phone');8 // telephone validation 9 if (get_option('dsv_telephone_validation')) 10 validate_telephone_datasoap_number_wc('billing_phone'); 10 11 11 // email validation12 if(get_option('dsv_email_validation'))13 validate_email_address_datasoap_wc('billing_email');12 // email validation 13 if (get_option('dsv_email_validation')) 14 validate_email_address_datasoap_wc('billing_email'); 14 15 } 15 16 16 function validate_telephone_datasoap_number_wc($name) { 17 $sanitisedNumber = ''; 18 19 if(isset($_POST[$name])){ 20 $sanitisedNumber = sanitize_text_field($_POST[$name]); 21 } 17 function validate_telephone_datasoap_number_wc($name) 18 { 19 $sanitisedNumber = ''; 22 20 23 $number = $sanitisedNumber; 21 if (isset($_POST[$name])) { 22 $sanitisedNumber = sanitize_text_field($_POST[$name]); 23 } 24 24 25 if ('' == $number) 26 return; 27 elseif ( '' != $number) { 28 $dsv_token = get_option('dsv_token'); 25 $number = $sanitisedNumber; 29 26 30 if($dsv_token != "") 31 { 32 $params = array( 33 'lookup' => $number, 34 'checks' => array ( 35 'Auto' 36 ) 37 ); 27 if ('' == $number) 28 return; 29 elseif ('' != $number) { 30 $dsv_token = get_option('dsv_token'); 38 31 39 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 32 if ($dsv_token != "") { 33 $params = array( 34 'lookup' => $number, 35 'checks' => array( 36 'Auto' 37 ) 38 ); 40 39 41 if(!isset($apiResult['valid'])){ 42 wc_add_notice(__('Please enter a valid phone number'), 'error' ); 43 return; 44 } 40 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 45 41 46 if ($apiResult['valid'] == false || $apiResult['valid'] == true && isset($apiResult['errors'])) 47 wc_add_notice(__('Please enter a valid phone number'), 'error' ); 48 } 49 else{ 50 $params = array( 51 'lookup' => $number, 52 'checks' => array ( 53 'Syntax' 54 ) 55 ); 42 if (!isset($apiResult['valid'])) { 43 wc_add_notice(__('Please enter a valid phone number'), 'error'); 44 return; 45 } 56 46 57 $apiResult = sendDataSoapValidationRequest($params, ""); 47 if ($apiResult['valid'] == false || ($apiResult['valid'] == true && isset($apiResult['errors']))) { 48 // Filter out the "Insufficient credit" error (-98) 49 $relevantErrors = array_filter($apiResult['errors'], function ($error) { 50 return $error['code'] != '-98'; 51 }); 58 52 59 if(!isset($apiResult['valid'])){ 60 wc_add_notice(__('Please enter a valid phone number'), 'error' ); 61 return; 62 } 53 if (!empty($relevantErrors)) { 54 wc_add_notice(__('Please enter a valid phone number'), 'error'); 55 } 56 } 57 } else { 58 $params = array( 59 'lookup' => $number, 60 'checks' => array( 61 'Syntax' 62 ) 63 ); 63 64 64 if ($apiResult['valid'] == false && !isset($apiResult['errors'])) 65 wc_add_notice(__('Please enter a valid phone number'), 'error' ); 66 } 67 } 65 $apiResult = sendDataSoapValidationRequest($params, ""); 66 67 if (!isset($apiResult['valid'])) { 68 wc_add_notice(__('Please enter a valid phone number'), 'error'); 69 return; 70 } 71 72 if ($apiResult['valid'] == false && !isset($apiResult['errors'])) 73 wc_add_notice(__('Please enter a valid phone number'), 'error'); 74 } 75 } 68 76 } 69 77 70 function validate_email_address_datasoap_wc($name) { 71 $sanitisedEmail = ''; 72 73 if(isset($_POST[$name])){ 74 $sanitisedEmail = sanitize_email($_POST[$name]); 75 } 78 function validate_email_address_datasoap_wc($name) 79 { 80 $sanitisedEmail = ''; 76 81 77 $email = $sanitisedEmail; 82 if (isset($_POST[$name])) { 83 $sanitisedEmail = sanitize_email($_POST[$name]); 84 } 78 85 79 if ('' == $email) 80 return; 86 $email = $sanitisedEmail; 81 87 82 $dsv_token = get_option('dsv_token'); 83 84 if($dsv_token != "") 85 { 86 $params = array( 87 'lookup' => $email, 88 'checks' => array ( 89 'Email' 90 ) 91 ); 88 if ('' == $email) 89 return; 92 90 93 $apiResult = sendDataSoapValidationRequest($params, $dsv_token);91 $dsv_token = get_option('dsv_token'); 94 92 95 if(!isset($apiResult['valid'])){ 96 wc_add_notice(__('Please enter a valid email address'), 'error' ); 97 return; 98 } 93 if ($dsv_token != "") { 94 $params = array( 95 'lookup' => $email, 96 'checks' => array( 97 'Email' 98 ) 99 ); 99 100 100 if ($apiResult['valid'] == false) 101 wc_add_notice(__('Please enter a valid email address'), 'error' ); 102 } 103 else{ 104 $params = array( 105 'lookup' => $email, 106 'checks' => array ( 107 'Syntax' 108 ) 109 ); 101 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 110 102 111 $apiResult = sendDataSoapValidationRequest($params, ""); 103 if (!isset($apiResult['valid'])) { 104 wc_add_notice(__('Please enter a valid email address'), 'error'); 105 return; 106 } 112 107 113 if(!isset($apiResult['valid'])){ 114 wc_add_notice(__('Please enter a valid email address'), 'error' ); 115 return; 116 } 108 if ($apiResult['valid'] == false) 109 wc_add_notice(__('Please enter a valid email address'), 'error'); 110 } else { 111 $params = array( 112 'lookup' => $email, 113 'checks' => array( 114 'Syntax' 115 ) 116 ); 117 117 118 if ($apiResult['valid'] == false) 119 wc_add_notice(__('Please enter a valid email address'), 'error' ); 120 } 118 $apiResult = sendDataSoapValidationRequest($params, ""); 119 120 if (!isset($apiResult['valid'])) { 121 wc_add_notice(__('Please enter a valid email address'), 'error'); 122 return; 123 } 124 125 if ($apiResult['valid'] == false) 126 wc_add_notice(__('Please enter a valid email address'), 'error'); 127 } 121 128 } 122 123 ?> -
data-soap-validation/trunk/includes/dsvwpf-validation.php
r2797046 r3260773 1 1 <?php 2 2 3 if (get_option('dsv_telephone_validation')) {4 add_action( 'wpforms_process_validate_phone', 'validate_telephone_datasoap_number_wpf', 10, 3);3 if (get_option('dsv_telephone_validation')) { 4 add_action('wpforms_process_validate_phone', 'validate_telephone_datasoap_number_wpf', 10, 3); 5 5 } 6 6 7 function validate_telephone_datasoap_number_wpf( $field_id, $field_submit, $form_data ) { 8 $number = $field_submit; 9 if($field_submit == null){ 10 return; 11 } 7 function validate_telephone_datasoap_number_wpf($field_id, $field_submit, $form_data) 8 { 9 $number = $field_submit; 10 if ($field_submit == null) { 11 return; 12 } 12 13 13 $number = sanitize_text_field($field_submit);14 $dsv_token = get_option('dsv_token');14 $number = sanitize_text_field($field_submit); 15 $dsv_token = get_option('dsv_token'); 15 16 16 if($dsv_token != ""){ 17 $params = array( 18 'lookup' => $number, 19 'checks' => array ( 20 'Auto' 21 ) 22 ); 23 24 25 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 26 27 if(!isset($apiResult['valid'])){ 28 wpforms()->process->errors[ $form_data['id']]['header'] = esc_html__( 'Some details invalid', 'plugin-domain' ); 29 wpforms()->process->errors[ $form_data['id'] ] [$field_id] = esc_html__('Please enter a valid phone number', 'plugin-domain'); 30 return; 31 } 17 if ($dsv_token != "") { 18 $params = array( 19 'lookup' => $number, 20 'checks' => array( 21 'Auto' 22 ) 23 ); 32 24 33 if ($apiResult['valid'] == false || $apiResult['valid'] == true && isset($apiResult['errors'])) {34 wpforms()->process->errors[ $form_data['id']]['header'] = esc_html__( 'Some details invalid', 'plugin-domain' );35 wpforms()->process->errors[ $form_data['id'] ] [$field_id] = esc_html__('Please enter a valid phone number', 'plugin-domain');36 }37 }38 else{39 $params = array(40 'lookup' => $number,41 'checks' => array (42 'Syntax'43 )44 );45 25 46 $apiResult = sendDataSoapValidationRequest($params, "");26 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 47 27 48 if(!isset($apiResult['valid'])){49 wpforms()->process->errors[ $form_data['id']]['header'] = esc_html__( 'Some details invalid', 'plugin-domain');50 wpforms()->process->errors[ $form_data['id'] ][$field_id] = esc_html__('Please enter a valid phone number', 'plugin-domain');51 return;52 }28 if (!isset($apiResult['valid'])) { 29 wpforms()->process->errors[$form_data['id']]['header'] = esc_html__('Some details invalid', 'plugin-domain'); 30 wpforms()->process->errors[$form_data['id']][$field_id] = esc_html__('Please enter a valid phone number', 'plugin-domain'); 31 return; 32 } 53 33 54 if ($apiResult['valid'] == false && !isset($apiResult['errors'])) 55 wpforms()->process->errors[ $form_data['id']]['header'] = esc_html__( 'Some details invalid', 'plugin-domain' ); 56 wpforms()->process->errors[ $form_data['id'] ] [$field_id] = esc_html__('Please enter a valid phone number', 'plugin-domain'); 57 } 34 if ($apiResult['valid'] == false || ($apiResult['valid'] == true && isset($apiResult['errors']))) { 35 // Filter out the "Insufficient credit" error (-98) 36 $relevantErrors = array_filter($apiResult['errors'], function ($error) { 37 return $error['code'] != '-98'; 38 }); 39 40 if (!empty($relevantErrors)) { 41 wpforms()->process->errors[$form_data['id']]['header'] = esc_html__('Some details invalid', 'plugin-domain'); 42 wpforms()->process->errors[$form_data['id']][$field_id] = esc_html__('Please enter a valid phone number', 'plugin-domain'); 43 } 44 } 45 } else { 46 $params = array( 47 'lookup' => $number, 48 'checks' => array( 49 'Syntax' 50 ) 51 ); 52 53 $apiResult = sendDataSoapValidationRequest($params, ""); 54 55 if (!isset($apiResult['valid'])) { 56 wpforms()->process->errors[$form_data['id']]['header'] = esc_html__('Some details invalid', 'plugin-domain'); 57 wpforms()->process->errors[$form_data['id']][$field_id] = esc_html__('Please enter a valid phone number', 'plugin-domain'); 58 return; 59 } 60 61 if ($apiResult['valid'] == false && !isset($apiResult['errors'])) 62 wpforms()->process->errors[$form_data['id']]['header'] = esc_html__('Some details invalid', 'plugin-domain'); 63 wpforms()->process->errors[$form_data['id']][$field_id] = esc_html__('Please enter a valid phone number', 'plugin-domain'); 64 } 58 65 } 59 66 60 if (get_option('dsv_email_validation')) {61 add_action( 'wpforms_process', 'validate_email_address_datasoap_wpf', 10, 3);67 if (get_option('dsv_email_validation')) { 68 add_action('wpforms_process', 'validate_email_address_datasoap_wpf', 10, 3); 62 69 } 63 70 64 function validate_email_address_datasoap_wpf( $fields, $entry, $form_data ) { 65 $email = ""; 66 $dsv_token = get_option('dsv_token'); 71 function validate_email_address_datasoap_wpf($fields, $entry, $form_data) 72 { 73 $email = ""; 74 $dsv_token = get_option('dsv_token'); 67 75 68 //check fields for email69 foreach ( $fields as $field_id => $field) {70 //if field type is email run validation logic71 if($field['type'] == "email"){72 $email = sanitize_email($field['value']);73 $emailId = sanitize_text_field($field['id']);76 //check fields for email 77 foreach ($fields as $field_id => $field) { 78 //if field type is email run validation logic 79 if ($field['type'] == "email") { 80 $email = sanitize_email($field['value']); 81 $emailId = sanitize_text_field($field['id']); 74 82 75 //return if email blank, setting field to required can be done in WPForms76 if($email == ""){77 continue;78 }83 //return if email blank, setting field to required can be done in WPForms 84 if ($email == "") { 85 continue; 86 } 79 87 80 if($dsv_token != ""){ 81 $params = array( 82 'lookup' => $email, 83 'checks' => array ( 84 'Email' 85 ) 86 ); 87 88 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 89 90 if(!isset($apiResult['valid'])){ 91 wpforms()->process->errors[ $form_data['id']]['header'] = esc_html__( 'Some details invalid', 'plugin-domain' ); 92 wpforms()->process->errors[ $form_data['id'] ] [$emailId] = esc_html__('Please enter a valid email address', 'plugin-domain'); 93 return; 94 } 88 if ($dsv_token != "") { 89 $params = array( 90 'lookup' => $email, 91 'checks' => array( 92 'Email' 93 ) 94 ); 95 95 96 if ($apiResult['valid'] == false){ 97 wpforms()->process->errors[ $form_data['id']]['header'] = esc_html__( 'Some details invalid', 'plugin-domain' ); 98 wpforms()->process->errors[ $form_data['id'] ] [$emailId] = esc_html__('Please enter a valid email address', 'plugin-domain'); 99 } 100 } 101 else{ 102 $params = array( 103 'lookup' => $email, 104 'checks' => array ( 105 'Syntax' 106 ) 107 ); 108 109 $apiResult = sendDataSoapValidationRequest($params, ""); 110 111 if(!isset($apiResult['valid'])){ 112 wpforms()->process->errors[ $form_data['id']]['header'] = esc_html__( 'Some details invalid', 'plugin-domain' ); 113 wpforms()->process->errors[ $form_data['id'] ] [$emailId] = esc_html__('Please enter a valid email address', 'plugin-domain'); 114 return; 115 } 96 $apiResult = sendDataSoapValidationRequest($params, $dsv_token); 116 97 117 if ($apiResult['valid'] == false) 118 wpforms()->process->errors[ $form_data['id']]['header'] = esc_html__( 'Some details invalid', 'plugin-domain' ); 119 wpforms()->process->errors[ $form_data['id'] ] [$emailId] = esc_html__('Please enter a valid email address', 'plugin-domain'); 120 } 121 } 98 if (!isset($apiResult['valid'])) { 99 wpforms()->process->errors[$form_data['id']]['header'] = esc_html__('Some details invalid', 'plugin-domain'); 100 wpforms()->process->errors[$form_data['id']][$emailId] = esc_html__('Please enter a valid email address', 'plugin-domain'); 101 return; 102 } 103 104 if ($apiResult['valid'] == false) { 105 wpforms()->process->errors[$form_data['id']]['header'] = esc_html__('Some details invalid', 'plugin-domain'); 106 wpforms()->process->errors[$form_data['id']][$emailId] = esc_html__('Please enter a valid email address', 'plugin-domain'); 107 } 108 } else { 109 $params = array( 110 'lookup' => $email, 111 'checks' => array( 112 'Syntax' 113 ) 114 ); 115 116 $apiResult = sendDataSoapValidationRequest($params, ""); 117 118 if (!isset($apiResult['valid'])) { 119 wpforms()->process->errors[$form_data['id']]['header'] = esc_html__('Some details invalid', 'plugin-domain'); 120 wpforms()->process->errors[$form_data['id']][$emailId] = esc_html__('Please enter a valid email address', 'plugin-domain'); 121 return; 122 } 123 124 if ($apiResult['valid'] == false) 125 wpforms()->process->errors[$form_data['id']]['header'] = esc_html__('Some details invalid', 'plugin-domain'); 126 wpforms()->process->errors[$form_data['id']][$emailId] = esc_html__('Please enter a valid email address', 'plugin-domain'); 127 } 122 128 } 129 } 123 130 } 124 125 ?> -
data-soap-validation/trunk/plugin_interface.php
r2818859 r3260773 44 44 'Content-Type' => 'application/json', 45 45 'Authorization' => "Bearer {$bearerToken}", 46 'Lib-Version' => 'WordPress-1.0. 6'46 'Lib-Version' => 'WordPress-1.0.7' 47 47 ), 48 48 'body' => $encodedBody, -
data-soap-validation/trunk/readme.txt
r2818859 r3260773 3 3 Tags: woocommerce, gravity, gravity forms, gravityforms, elementor, elementor pro, contact form 7, contactform7, cf7, data validation, data, form, international, mobile, phone, validation, verification 4 4 Requires at least: 4.5 5 Tested up to: 6. 16 Stable tag: 1.0. 65 Tested up to: 6.7.2 6 Stable tag: 1.0.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 52 52 * Adjusted API call 53 53 54 = 1.0.7 = 55 * Bug fix + tested for 6.7.2 56 54 57 == Frequently Asked Questions == 55 58
Note: See TracChangeset
for help on using the changeset viewer.