title: Python / Django - How to create regex (RegexValidator) which allows only letters and spaces?
body: <p>This is my code:</p>
  
  <pre><code>class Location(models.Model):
      alphaSpaces = RegexValidator(r'^[a-zA-Z]+$', 'Only letters and spaces are allowed in the Location Name.')
  
  
      locationName = models.CharField(max_length=80, unique=True, validators=[alphaSpaces])
  </code></pre>
  
  <p>But when I try to create a location called 'Location My Location' it raises the error and says <code>Only letters and spaces are allowed in the Location Name</code>.</p>
  
  <p>For what it's worth, I am using a RESTful API and passing the location name in a JSON object like this:</p>
  
  <pre><code>data = {'locationName': 'Location My Location'}
  </code></pre>