0
field: {

    required: true,
                messages: {
                required: 'this is a text for required'
                }
}

Why the messages property doesn't change the required message error?, is there a way to do that inside each field?

display-name-is-missing
  • 4,424
  • 5
  • 28
  • 41
yeah its me
  • 1,131
  • 4
  • 18
  • 27

1 Answers1

0

You can specify an error message for when a specific field does not pass a specific rule, but you do it like this:

{
    rules: {
        field: {
            required: true
        }
    },
    messages: {
        field: {
            required: "error message when field is empty"
        }
    }
}

Note: In this case, "field" is the name of the input element.

John S
  • 21,212
  • 8
  • 46
  • 56