custom jquery validation messages

Solutions on MaxInterview for custom jquery validation messages by the best coders in the world

showing results for - "custom jquery validation messages"
Francesca
24 Jan 2016
1var validator = $("#signupform").validate({
2    rules: {
3        firstname: "required",
4        lastname: "required",
5        username: {
6            required: true,
7            minlength: 2,
8            remote: "users.php"
9        }
10    },
11    messages: {
12        firstname: "Enter your firstname",
13        lastname: "Enter your lastname",
14        username: {
15            required: "Enter a username",
16            minlength: jQuery.format("Enter at least {0} characters"),
17            remote: jQuery.format("{0} is already in use")
18        }
19    }
20});
21