Can't change ModelForm fields' default error message


I adapt my model form to my html form design, It can submit data successfully, It has placeholder which is I wrote , It gives the error when you forget to input data required fields.
However, I couldn’t change default message. It is always, “This value is required.”

My model

class MyModel(models.Model):
      a_field = models.CharField(max_length=254,)
      b_field = models.EmailField(max_length =254)
...other fields...

I’m sharing you what I tried to change error message on the forms.
class MyForm(forms.ModelForm):
    class Meta:
        model = MyModel
        fields = ('a_field', 'b_field', 'c_field', ....other fields)

     widgets = {
    'a_field':forms.TextInput(attrs={'placeholder':'Placeholder a'}),
    'b_field':forms.TextInput(attrs={'placeholder':'Placeholder b'}),
     .... others...

First, I tried this.

    error_messages = {
        'a_field': {
            'required': _("Custom required message"),

In the def init… I tried these things,

def __init__(self, *args, **kwargs):
    super(PersonForm, self).__init__(*args, **kwargs)

I added this lines,

        'required': 'Required Message',

Doesn’t change the error message…

    self.fields['b_field'].error_messages = {'required': 'custom required message'}

I tried to add this too for all fields but nothing changes.

    for field in self.fields.values():
        field.error_messages = {'required':'The field {fieldname} is required'.format(

My template currently:

    <form method="post" novalidate class="form-control contact-form__inner" action="{% url 'demo'%}">
      {% csrf_token %}
      <div class="contact-form__inner-left">
        <div class="form-item form-item--border">
          {{ form.field_a }}
        <div class="form-item form-item--border">
          {{ form.field_b }}

My template before I manipulate the form with my modelform,

This required messages were visible.

    <form action="" class="form-control contact-form__inner">
      <div class="contact-form__inner-left">
        <div class="form-item form-item--border">
          <input type="text" placeholder="Placeholder a" data-parsley-required-message="Required message." required>
        <div class="form-item form-item--border">
          <input type="text" placeholder="Placeholder b" data-parsley-required-message="Required message." required>

What am I missing ? Why I can’t change the error messages ?

Thanks in advance…

Are you using any JavaScript framework to perform client-side validation before the form is submitted?

@KenWhitesell , thank you for interest.

Because of I do not do the front-end works in this project, I don’t know much about it, but I think it is being used.

Because, in the post I wrote, at the bottom there is the piece of original version of the template. and the required message there was working.

Looks like then you need to find out from the front end what needs to be supplied for the error messages - this wouldn’t be something under Django’s form control, but rather something you may need to specifically render in the template.