Knockout Validation: how to validate the fields on button click, not on input change
<p>I'm using the following knockout validation plugin: <a href="https://github.com/Knockout-Contrib/Knockout-Validation" rel="noreferrer">https://github.com/Knockout-Contrib/Knockout-Validation</a></p>

<p>I want to validate my fields when I click on the "Submit" button, not everytime when I change the input's value. How can I do that?</p>

<p>Javascript:</p>

<pre><code>ko.validation.init({
    insertMessages:false,
    messagesOnModified:false,
    decorateElement: true,
    errorElementClass: 'wrong-field'
}, true);

var viewModel = {
    firstName: ko.observable().extend({minLength: 2, maxLength: 10}),
    lastName: ko.observable().extend({required: true}),
    age: ko.observable().extend({min: 1, max: 100}),
    submit: function() {
        if (viewModel.errors().length === 0) {
            alert('Thank you.');
        }
        else {
            alert('Please check your submission.');
            viewModel.errors.showAllMessages();
        }
    },
};

viewModel.errors = ko.validation.group(viewModel);

ko.applyBindings(viewModel);
</code></pre>

<p>HTML:</p>

<pre><code>&lt;fieldset&gt;    
    &lt;div class="row" data-bind="validationElement: firstName"&gt;
        &lt;label&gt;First name:&lt;/label&gt;
        &lt;input type="text" data-bind="textInput: firstName"/&gt;
    &lt;/div&gt;

    &lt;div class="row" data-bind="validationElement: lastName"&gt;
        &lt;label&gt;Last name:&lt;/label&gt;
        &lt;input data-bind="value: lastName"/&gt;
    &lt;/div&gt;

    &lt;div class="row"&gt;
        &lt;div class="row"&gt;
            &lt;label&gt;Age:&lt;/label&gt;
            &lt;input data-bind="value: age" required="required"/&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/fieldset&gt;

&lt;fieldset&gt;
    &lt;button type="button" data-bind='click: submit'&gt;Submit&lt;/button&gt;
    &amp;nbsp;
&lt;/fieldset&gt;
</code></pre>

<p>This is my jsfiddle: <a href="http://jsfiddle.net/xristo91/KHFn8/6464/" rel="noreferrer">http://jsfiddle.net/xristo91/KHFn8/6464/</a></p>