Title: Validation
Last modified: January 4, 2024

---

# Validation

 *  Resolved [andriiwork](https://wordpress.org/support/users/andriiwork/)
 * (@andriiwork)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/validation-47/)
 * Hello All.
   I use last version 6.4.2, and activate validation on Register Form(
   Only English letters), when I write Russian text in fields and click Registration
   button, I don’t see error message and I can register.
 * Maybe someone had such a problem and knows how to solve it?
   Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/validation-47/#post-17318131)
 * [@andriiwork](https://wordpress.org/support/users/andriiwork/)
 * I tried to find the UM PHP code where this “English letters only” is being validated
   and it’s not being implemented at all.
 * I have made an UM Bug report about your issue.
 * [https://github.com/ultimatemember/ultimatemember/issues/1417](https://github.com/ultimatemember/ultimatemember/issues/1417)
 *  Thread Starter [andriiwork](https://wordpress.org/support/users/andriiwork/)
 * (@andriiwork)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/validation-47/#post-17318755)
 * Thanks! [@missveronicatv](https://wordpress.org/support/users/missveronicatv/)
 * You help me 🙂
   This code work. (I have 4 language in my site).
 *     ```wp-block-code
       function um_custom_validate_english_language( $key, $array, $args ) {
           if ( preg_match('/[^A-ZĄĆĘŁŃÓŚŹŻa-ząćęłńóśźż0-9-]/', $args[$key] ) )  {
       		    if (is_page('2974') && get_the_id() == 2974){
       				UM()->form()->add_error( $key, __( 'Пожалуйста, используйте только Английские буквы', 'ultimate-member' ) );
       			}
       		    if (is_page('6412') && get_the_id() == 6412){
       				UM()->form()->add_error( $key, __( 'Будь ласка, використовуйте тільки Англійські літери', 'ultimate-member' ) );
       			}
       		    if (is_page('6424') && get_the_id() == 6424){
       				UM()->form()->add_error( $key, __( 'Please use only English letters', 'ultimate-member' ) );
       			}
       		    if (is_page('6432') && get_the_id() == 6432){
       				UM()->form()->add_error( $key, __( 'Proszę używać wyłącznie Angielskich liter', 'ultimate-member' ) );
       			}
           }
       }
       add_action( 'um_custom_field_validation_english_language', 'um_custom_validate_english_language', 30, 3 ); 
       ```
   
    -  This reply was modified 2 years, 4 months ago by [andriiwork](https://wordpress.org/support/users/andriiwork/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Validation’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [andriiwork](https://wordpress.org/support/users/andriiwork/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/validation-47/#post-17318755)
 * Status: resolved