philguillard schrieb:
> I can't add and show an error message programmatically, seems to me that
> addErrors function doesn’t exist in validation plugin 1.0 Beta 1
>
> But I found this in the docs :
> var validator = $("#myform").validate();
> validator.addErrors({"firstname": "I know that your firstname is Pete,
> Pete!"});
> validator.showErrors();
>
> It seems a validator.showErrors({'id': 'the error'}); doesn't provide
> the right information.
>
> Anybody can help?
>
Just in case you didn't get my reply on the plugins list: Use showErrors
instead of addErrors directly. I forgot to update the example, but fixed
it in the latest revision. This should work:
var validator = $("#myform").validate();
validator.showErrors({"firstname": "I know that your firstname is Pete,
Pete!"});
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/