Website Field Validation
-
I need website field validation. I’ve used the code mentioned below, but after using this code, the error messages do not appear after submitting the form, and the spinner keeps rotating. The code is:
// Website field validation
// add_filter( ‘wpcf7_validate_text*’, ‘custom_website_validation_filter’, 20, 2 );
// function custom_website_validation_filter( $result, $tag ) {
// if ( $tag->name == ‘website’ ) {// $domain = isset( $_POST[‘website’] ) ? trim( $_POST[‘website’] ) : ”;
// if ( ! checkdnsrr($domain, ‘ANY’) ) { // Check DNS records corresponding to a given Internet host name or IP address
// $result->invalidate( $tag, “We cannot find an active dns record for that website url” );
// }
// }
// return $result;
// }
I’ve commented this code for now. Please check and help as this is urgent.The page I need help with: [log in to see the link]
- The topic ‘Website Field Validation’ is closed to new replies.