I noticed today that we have an issue with jquery Validate when used in conjunction with placeholder text.
Example:
&
This is generic way of validating placeholders (use following code AFTER validation logic initialization). It works by injecting custom logic into all validation methods.
$(function () {
$.each($.validator.methods, function (key, value) {
$.validator.methods[key] = function () {
var el = $(arguments[1]);
if (el.is('[placeholder]') && arguments[0] == el.attr('placeholder'))
arguments[0] = '';
return value.apply(this, arguments);
};
});
});