@Maciejos92 na przyszłość pisz w wątku, nie na PW.
Używamy tego hooka. Proszę przeczytaj ten kod i jak masz pytania to je zadawaj - odpowiem. Nie chcę, żebyś zrobił tylko ctrl + c i ctrl + v.
...
showErrors: function(errorMap, errorList) {
// ukrywamy wszystkie errory, a pokazujemy tylko te, co są w errorList
$(this.currentForm)
.find('.error')
.hide();
errorList.forEach(function(error) {
var input = $(error.element);
var errorContainer = input.next('.error');
var classNames = ['error'];
if (errorContainer.length === 0) {
errorContainer = $('<div />');
input.after(errorContainer);
}
if (error.method == 'required') {
classNames.push('required');
}
errorContainer
.text(error.message)
.attr('class', classNames.join(' '))
.show();
});
},
...
JSFiddle