title: Validation Rule - User input cannot be left blank - Python
body: <p>I'm currently working on a program that has a validation rule for a name, which doesn't allow any punctuation to be entered. The input is stored in a variable, name, and then stored in a file later on. I have already got the punctuation sorted out. However, when I went back to test my program, I realised that if I left the field blank, the program would accept my input. Here is that part of my code:</p>
  
  <pre><code>n = True
  while n == True:
      name = input("\nPlease enter your name:\n")
      invalidName = re.search("[^A-Za-z]+",name)
  
      if invalidName:
          print("No special characters will be accepted.")
      else:
          print("Accepted.")
          name = name.lower()
          name = name.title()
          n = False
  </code></pre>
  
  <p>I would greatly appreciate it if someone came up with something to make it so that the user input must have something entered for the program to accept it.</p>