我已经使用它并且喜欢它。但是我不得不覆盖验证错误消息。我是这样做的。
//Listen for the 'input' event on the email field. If HTML5 validation throws a typeMismatch, then
// override the default message with something more useful and/or sarcastic.
$('#email').bind('input', function () {
//We need to reset it to blank or it will throw an invalid message.
this.setCustomValidity('');
if (!this.validity.valid) {
this.setCustomValidity("Dude '" + this.value + "' is not a valid email. Try something like "+
"jim@email.org. And no we are not checking if it actually works, we are just looking "+
"for the @ sign. ");
}
});
您可以在github的一个工作示例中找到它。