|
|
@ -274,7 +274,7 @@ class Cf7_States_Cities_Public { |
|
|
$result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) ); |
|
|
$result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ( $tag->type === 'state' || $tag->type === 'state*' ) { |
|
|
|
|
|
|
|
|
if ( !$empty && ( $tag->type === 'state' || $tag->type === 'state*' ) ) { |
|
|
$states = require( plugin_dir_path( __FILE__ ) . '../data/states.php' ); |
|
|
$states = require( plugin_dir_path( __FILE__ ) . '../data/states.php' ); |
|
|
|
|
|
|
|
|
if ( !in_array( $_POST[$name], $states ) ) { |
|
|
if ( !in_array( $_POST[$name], $states ) ) { |
|
|
@ -282,7 +282,7 @@ class Cf7_States_Cities_Public { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ( $tag->type === 'city' || $tag->type === 'city*' ) { |
|
|
|
|
|
|
|
|
if ( !$empty && ( $tag->type === 'city' || $tag->type === 'city*' ) ) { |
|
|
$cities = require( plugin_dir_path( __FILE__ ) . '../data/cities.php' ); |
|
|
$cities = require( plugin_dir_path( __FILE__ ) . '../data/cities.php' ); |
|
|
|
|
|
|
|
|
if ( !in_array( $_POST[$name], $cities ) ) { |
|
|
if ( !in_array( $_POST[$name], $cities ) ) { |
|
|
|