public void verifyAccountNameStrength ( String accountName ) throws AuthenticationException { Matcher matcher = PATTERN . matcher ( accountName ) ; if ( ! matcher . matches ( ) ) { throw new AuthenticationException ( accountName + " is not a valid email" ) ; } }
Ensures that the account name passes site - specific complexity requirements like minimum length .