Skip validation of model attribute using Backbone.Validation
<p>I have a view that is rendered dynamically. It may have some inputs or may not have.
After a user fills everything and tries to send data I call <code>this.model.isValid(true)</code> ( or <code>this.model.isValid()</code> ) and it returns <code>false</code> even if the data from inputs is valid.</p>

<p>I think the cause is <a href="https://github.com/thedersen/backbone.validation" rel="nofollow noreferrer">Backbone Validation</a> tries to validate attributes of inputs we did not render. </p>

<p>Is there any solution to skip model attributes if we have no <a href="https://nytimes.github.io/backbone.stickit/docs/annotated/" rel="nofollow noreferrer">sticked</a> elements of a view?</p>

<p><strong>UPDATE:</strong></p>

<p>My <strong><em>model</em></strong> is similar to this:</p>

<pre><code>MyApp.module("RecordModel", function (RecordModel, MyApp, Backbone) {
    RecordModel.recordModel = Backbone.Model.extend({
        validation: {
            inn: {
                pattern: 'inn',
                msg: MyApp.messages.inn
            },

            bik: {
                pattern: 'bik',
                msg: MyApp.messages.bik
            },

            uin: {
                pattern: 'uin',
                msg: MyApp.messages.uin
            },

            sum: {
                pattern: 'sum',
                msg: MyApp.messages.sum
            }

        }
    });
});
</code></pre>

<p><strong><em>Bindings:</em></strong> </p>

<pre><code>bindings: {

    '#uin': {
        observe: 'uin',
            setOptions: {
            validate: true
        },

        events: MyApp.Validation.events.inputEvents
    },

    '#bik': {
        observe: 'bik',
            setOptions: {
            validate: true
        },
        events: MyApp.Validation.events.inputEvents
    },

    '#inn': {
        observe: 'inn',
            setOptions: {
            validate: true
        },
        events: ParkingMate.Validation.events.inputEvents
    },

    '#sum': {
        observe: 'sum',
            setOptions: {
            validate: true
        },
        events: MyApp.Validation.events.inputEvents
    }
}
</code></pre>

<p>So for some reason we din't render <code>#sum</code> input for instance. As we haven't it got in our DOM, it doesn't exists in <code>RecordModel</code>, but backbone still tries to validate it. Or if we have this input in our DOM, everything works fine.</p>