jQuery array validation
<p>Is there any way to accept number from 10 to 50 along with 'AB' and 'NF'-</p>

<p>Following code accepts 0 to any number along with 'AB' and 'NF'</p>

<pre><code>  &lt;script&gt;
        $.validator.addMethod("custom_number", function(value, element) {
            return this.optional(element) || value == "AB" || value == "NF" || 
                value.match(/^[0-9,\+-]+$/);
        }, "Please enter a valid number, or 'AB'");

        $(document).ready(function(){
            $("#form").validate({
                rules: {
                    'hd[]': {
                        required: false,
                        custom_number: true   
                    }
                }
            });
        });
    &lt;/script&gt;
</code></pre>

<p>Thanks in advance.</p>
