title: How to get WTForms to require entry into a RadioButton field?
body: <p>I'm creating a web form using Flask and Flask-WTF. The form is dynamic, with the fields determined by the database. Some questions in the database specify a radio button field, while others specify a single word.</p>
  
  <p>I need to require that the radio button fields have a selection. Using <code>wtforms.validators.DataRequired</code> works perfectly for the string fields, but not the radio fields.</p>
  
  <pre><code>...
      if question.category == 'word':
          field = StringField(question.question, validators=[DataRequired()])
      elif question.category == 'likert':
          choices = [('1', 'Strongly Agree'), ('2', ...
          field = RadioField(question.question, choices=choices,
                             validators=[DataRequired()])
      setattr(FlaskForm, str(question.id), field)
  stator(FlaskForm, 'submit', SubmitField('Submit))
  form = FlaskForm()
  ....
  </code></pre>
  
  <p>Leaving any string field blank results in an error message when submitted. But nothing happens if a radio field is left without a selection.</p>
  
  <p>How can I correct this?</p>