This is something of an odd one. There are many questions on SO in regard to setting the `ignore` property for unobtrusive validation's `settings` object.

The scenario: I have a table generated by iterating over a model in MVC and I auto-populate a blank row at the bottom by inserting a blank model at the server side (it's part of the requirements, non-negotiable). I don't want to validate this blank row if the user hasn't touched it but do if they have.

To solve this, I generate the table as normal. Using jquery, I auto mark any blank rows with a class of "blank". I can see this happening only for blank rows in the table by viewing the source.

Now, if in the document.read() call on the client I have;

```
$.validator.unobtrusive.parse('form');
var form = $('form').get(0);
var settings = $.data(form, 'validator').settings;
settings.ignore = ':hidden,.blank';

```

This works just fine. Hitting submit will not trigger validation on blank rows even when I add new ones. However, validation doesn't happen on any of the populated rows apart from the first row.

To solve this, I created a function `reattachValidation()` that is called whenever I add a new row so that validation will trigger for the new rows. The code was modified to:

```
function reattachValidation() {
    var forms = $('form');
    forms.removeData('validator');
    forms.removeData('unobtrusiveValidation');

    $.validator.unobtrusive.parse('form');
    var form = $('form').get(0);
    var settings = $.data(form, 'validator').settings;
    settings.ignore = ':hidden,.blank';
}

```

Now the code above will validate any new rows dynamically added to the table but will also validate the blank rows which still have a class of "blank" on the relevant elements. So I can either not validate blank rows and no new rows OR I can validate all rows including those with elements tagged with "blank".

How can I ignore the blank rows while also validating the new rows with user data?