2012-10-03 23:34:27 +02:00
|
|
|
$(function () {
|
2012-10-03 23:43:25 +02:00
|
|
|
$('#registration').validate({
|
|
|
|
errorElement: "p",
|
|
|
|
errorPlacement: function (error, element) {
|
|
|
|
error.appendTo(element.parent()).addClass('help-inline');
|
|
|
|
element.parent().parent().removeClass('success').addClass('error');
|
|
|
|
},
|
|
|
|
success: function (label) {
|
|
|
|
label.parent().parent().removeClass('error').addClass('success');
|
2012-10-04 17:05:34 +02:00
|
|
|
}
|
2012-10-03 23:43:25 +02:00
|
|
|
});
|
|
|
|
|
2012-09-25 22:58:59 +02:00
|
|
|
$("#email_signup").validate({
|
2012-10-03 23:43:25 +02:00
|
|
|
errorElement: "p",
|
|
|
|
errorClass: "validation-failed",
|
|
|
|
errorPlacement: function (error, element) {
|
|
|
|
$('#errors').empty();
|
|
|
|
element.parent().parent().removeClass('success').addClass('error');
|
|
|
|
error.appendTo("#errors")
|
2012-10-04 17:05:34 +02:00
|
|
|
.addClass("text-error");
|
2012-10-03 23:43:25 +02:00
|
|
|
},
|
|
|
|
success: function (label) {
|
|
|
|
label.parent().parent().removeClass('error').addClass('success');
|
2012-10-04 17:05:34 +02:00
|
|
|
}
|
2012-09-25 22:58:59 +02:00
|
|
|
});
|
|
|
|
});
|