i this case Input Email couln't be blank (required: true) <input type="text" name="Email" value="Your Email" onFocus="doClear(this)" onBlur="doDefault(this)"/>
issue:
$('#enquiry').validate({
rules: {
Email: {
email: true
}
},
messages: {
Email: "Enter valid email"
}
});
function doClear(theText) { if (theText.value == theText.defaultValue) { theText.value = "" } }; function doDefault(theText) { if (theText.value == "") { theText.value = theText.defaultValue } }; <input type="text" name="Email" value="Your Email" onFocus="doClear(this)" onBlur="doDefault(this)"/>
In this case we need just check email, phone or other conditions only to be valid if they typed by user and not blank or default.
email: true = valid email (could not be blank by defaul itself); By default (email || phone || card || other ) methods not valid even if not required.