There is a check for the presence of Cyrillic in the login:

if (!preg_match("/[а-я]+/i", $_POST['Login'])) { /* норм */ } else { /* не норм */ } 

How to add a space check?

    3 answers 3

     \s 

    matches any whitespace character (space, tab, new line, format translation, etc.)

    • I thank, the truth has already managed to find a solution to the friend: preg_match ("/ [a-zA-Z_0-9] + /", $ _POST ['Login']) - nikita_sergeevich

    Your logic is wrong, on the contrary you need to:

     if (!preg_match("/[а-я ]+/i", $_POST['Login'])) { /* не норм */ } else { /* норм */ } 

    and for unicode u add

      Vashhet so.

       if ( preg_match('/[а-я\s]+/i', $_POST['Login']) ) { /* норм */ } else { /* не норм */ }