title: Name check during registration - python
body: <p>I'm working on a mini python project for registering and checking validation of name, mail, username, etc. btw, I used regex for most times. in the name validation function, I don't really know the issue, but its output is:
  <a href="https://i.stack.imgur.com/xlbHI.png" rel="nofollow noreferrer">The output should write that a problem has occurred (don't look at my writing issues :D) and then show what is the actual problem. </a></p>
  
  <p>This is the code:</p>
  
  <pre><code>import re
  
  def register():
    # all registering and checking proccess.
    name = input('Name: ')
    username = input('Username: ')
    password = input('Please select password: ')
    mail = input('Mail: ')
    mail_check_return = mail_check(mail)
    password_check_return = password_check(password)
    name_check_return = name_check(name)
  
    if password_check_return == True and name_check_return == True and len(username) &gt; 1 and 
  mail_check_return == True:
      print(f'{name}, you have been registerd sucsessfully!')
    else:
  
      print('\na problem has occurred!')
      if mail_check_return == False:
        print('The entered mail is invalid.')
  
      if password_check_return != True:
        print(password_check_return)
  
      if len(username) &lt;= 1:
        print('The entered username is invaild.')
  
      register()
    return name, username, mail
  
  def menu():
    print('Hello! what do you want to do?')
    name, username, mail = register()
  
  def match(entered_password, entered_username):
    pass
    # not finished.
  
  def mail_check(mail_c):
    if '@' in mail_c and len(mail_c) &gt; 6:
      return True
    else:
      return False
  
  def password_check(password):
    if len(password) &gt;= 6:
      if re.search('[0-9]', password):      
        if re.search('[A-Za-z]', password):
          return True
        else:
          return 'Your password must contain numbers.'
      else:
        return 'Your password must contain english characters.'
    else:
      return 'Your password must contain at least 6 characters.'
  
  def name_check(name):
    if len(name) &lt;= 2:
      if re.search('[0-9]', name):
        return 'Your name can\'t contain numbers!'
      else:
        if re.search('[A-Za-z]', name):
          return True
        else:
          return 'The name is invalid.'
  
  def match(entered_password, entered_username):
    pass
  
  def sign_in(username): # 4 lined to un(note). VVV
  
    # not finished.
     pass
  menu()
  </code></pre>
  
  <p>Thanks for any help :)</p>