[jQuery] showErrors and errorPlacement [validation]
hello i got a nice form system going with some custom placement of
errors but i want to also count the amoutn of errors and display that
as well. How can i do this in code?
i have this :
errorPlacement: function(error, element) {
error.appendTo( element.siblings('span.valmessage') )
}
which displays the errors were i want them but when i try to use this
as well to have a live view of the amount of errors:
showErrors: function(errorMap, errorList) {
$("div#formerror span").html("Your form contains "
+ this.numberOfInvalids()
+ " errors, see details below.");
}
errorPlacement wont work with it?!?!?
how can i merge the two functions together into showErrors option so
as to place my errors where i want and also display the amount of
errors at the same time
thanks for help im new to jquery and im not sure how the show error
option works in regards to the errorMap and errorList arguments that
come into it.