0

I have a bunch of address inputs and I want to change the default required message in one go without typing each message for each input field.

$(document).ready(function() {
    $('#frm').validate({
        rules: {
            street: {
                required: true
            },
            city: {
                required: true
            },
            province: {
                required: true
            }, ...
        },
        messages: {
            required: "ASDSA"
        }, ...
});

I tried this code but it does not work. No response or effect from the browser whatsoever.

  • Does this answer your question: [jquery validation - change default error message](https://stackoverflow.com/a/2457053/2181514)? Or any of [these](https://stackoverflow.com/search?q=%5Bjquery-validate%5D+change+This+field+is+required)? – freedomn-m Nov 19 '21 at 12:58
  • 1
    The first one worked well, thanks for pointing that one out – inNeedOfHelp Nov 19 '21 at 13:08

0 Answers0