Custom validation message


/ Published in: Django
Save to your folder(s)



Copy this code and paste it in your HTML
  1. class ReviewForm(forms.Form):
  2. rating = forms.ChoiceField(choices=STARS, error_messages={'required': 'Please choose a star rating'})
  3. note = forms.CharField(widget=forms.Textarea(),)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.