jzaefferer/jquery-validation — Issue #283: Issue with error message disappearing
Author: jostster
Created: 2011-12-14 15:56:19+00:00
State: open

I am using validator with jquery mobile and have my errorPlacement setup like so

```javascript
$.validator.setDefaults({
invalidHandler: function(form, validator) {
$.validator.messages.required = "";
alert('You have ' + validator.numberOfInvalids() + ' invalid fields.');
},
errorPlacement: function(error, element) {
error.insertAfter($('label[for='+element.attr('name')+']'));
}
});
```
However when a validation error occurs the error is displayed between the element and the label but once the screen is tapped to drag to scroll the page ALL of the errors disappear.