根据the documentation 您必须创建一个自定义过滤器来支持它-您可以这样做:
add_filter( \'wpcf7_validate_text*\', \'custom_text_validation_filter\', 20, 2 );
function custom_text_validation_filter( $result, $tag ) {
if ( \'your-name\' == $tag->name ) {
// matches any utf words with the first not starting with a number
$re = \'/^[^\\p{N}][\\p{L}]*/i\';
if (!preg_match($re, $_POST[\'your-name\'], $matches)) {
$result->invalidate($tag, "This is not a valid name!" );
}
}
return $result;
}