//contact form7 海外スパムメール対策 add_filter('wpcf7_validate_textarea', 'wpcf7_validation_textarea_hiragana', 10, 2); add_filter('wpcf7_validate_textarea*', 'wpcf7_validation_textarea_hiragana', 10, 2); function wpcf7_validation_textarea_hiragana($result, $tag) { $name = $tag['name']; $value = (isset($_POST[$name])) ? (string) $_POST[$name] : ''; if ($value !== '' && !preg_match('/[ぁ-ん]/u', $value)) { $result['valid'] = false; $result['reason'] = array($name => '送信できません。'); } return $result; } P6030276 – 玲元美術
玲元美術