diff --git a/includes/core/um-actions-form.php b/includes/core/um-actions-form.php index c1c7689e..c5955100 100644 --- a/includes/core/um-actions-form.php +++ b/includes/core/um-actions-form.php @@ -995,6 +995,16 @@ function um_submit_form_errors_hook_( $submitted_data, $form_data ) { } break; + case 'english': + if ( '' !== $submitted_data[ $key ] ) { + + if ( ! preg_match( '/^[a-zA-Z]*$/u', str_replace( ' ', '', $submitted_data[ $key ] ) ) ) { + UM()->form()->add_error( $key, __( 'You must provide english letters', 'ultimate-member' ) ); + } + } + + break; + } } // end if ( isset in args array )