using Jquery to show one error message at a time
<p>I'm trying to show one error message at a time and then once that error has been corrected to show the next error.</p>

<p>For example there is validation on three textbox (Date, Month &amp; Year) once the date textbox is valid then the month error message choudl show.</p>

<p>The code I have so far for this is: </p>

<pre><code>var pi_ArrayValidationResult;
var pi_EachValidator = function(delegate) {
    if (typeof (Page_Validators) !== undefined) {
        for (var i = 0; i &lt; Page_Validators.length; ++i) {
            delegate(Page_Validators[i]);
        }
    }
};

var pi_CheckValidators = function() {

    var fields = {};
    pi_EachValidator(function(val) {
        if (fields[val.controltovalidate] === undefined) {
            fields[val.controltovalidate] = true;
        }
        fields[val.controltovalidate] = fields[val.controltovalidate] &amp;&amp; val.isvalid;
    });
    for (var field in fields) {
        if (fields.hasOwnProperty(field)) {
            $('#' + field)
                .parent('div.fm-req')
                .toggleClass('fm-error', !fields[field]);
</code></pre>

<p>This section is the bit that needs modification, to show one error then the next once the previous error is corrected:</p>

<pre><code>            $('#' + field).siblings('span').hide();  
            $('#' + field).siblings('span').each(function() {
                var $this = $(this);
                if (!$this.isvalid) {
                    $this.show();
                    return false;
                }
            });
        }
    }
};

return {
    init: function(args) {
        var fnOld = ValidatorUpdateIsValid;
        ValidatorUpdateIsValid = function() {
            fnOld();
            pi_CheckValidators();
        }
    }
};
</code></pre>
