How can I change the general message "This field is required" in the jQuery form validation plugin to "こ の フ ィ ー ル ド は 必須 で す"? The message color can be changed using the following code:
<style type="text/css">
label.error {color: red;}
</style>
But how to change the content?
I want to change all posts to "This filed required".
I want to change all the "necessary" messages to "こ の フ ィ ー ル ド は 必須 で す".
$(".selector").validate({
rules: {
name: "required",
email: {
required: true,
email: true
}
},
messages: {
name: "Please specify your name",
email: {
required: "We need your email address to contact you",
email: "Your email address must be in the format of name@domain.com"
}
}
})
changes only a specific message for a specific rule and a specific element.
I wrote
messages: {
required:"このフィールドは必須です"
}
but that will not work.
source
share