You need to check the string so that only the [az] is passed. All that does not fall into this list should not be skipped. Also, if the user has entered uppercase characters, they must be transformed into lowercase characters. Does anyone have a simple solution to this problem? The only thing that comes to the head is checking every character through a loop. But even here it is not clear how to write it correctly.
for(int i = 0; i < login.length(); i++){ if(login.charAt(i) //тут хочу .matches влепить, но не работает так. :((( }