Answer the question
In order to leave comments, you need to log in
django modelform field replace standard error message in all fields
The task is this: django returns "Required field." if the field is required and not filled. How to make it so that in all forms it is acceptable instead of "Required field." was "this field must be filled"?
Answer the question
In order to leave comments, you need to log in
first thought...)
{% if form.field.error='Required field' %}this field must be filled in{% endif %}
email = forms.EmailField(label='Email', required=False, error_messages={'required': 'This field must be filled in.'})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question