title: Determining variations of Javascript array
body: <p>I have an alert dependent on an array containing around 38 of the 50 United States, It works fine (thanks to help from you wonderful people) but now I'm concerned users may input variations of the format I am using currently which is two uppercase letters (i.e. WA, OR, GA etc). What if they are to input lowercase (i.e. wa, or, ga) or maybe a combination of uppercase and lowercase (i.e. Wa, Or, Ga) or with symbols (i.e. WA - Washington, OR - Oregon, GA - Georgia). Wondering if there is a more accurate way of doing this that will catch all variations.</p>
  
  <p>The alert I'm referring to is the last one, at the bottom pointing toward #address_province.</p>
  
  <p>Please note I am very new at using both Javascript and jQuery so as much detail as you can offer is appreciated.</p>
  
  <p>Thank you very much in advance.</p>
  
  <pre><code>&lt;script&gt;
  // Hides shipping info fieldset if ship to billing is checked
  $(function () {
      $("#ship_to_billing").change(function () {
          if ($(this).is(":checked")) $("#shipping_info").hide();
          else $("#shipping_info").show();
      });
  });
  
  // Validates address fields are filled out unless ship to billing is checked...   
  function validateShipping() {
      if (!$("#ship_to_billing").is(":checked")) {
          var inputs = $("#shipping_info input");
          var ready = true;
          inputs.each(function () {
              if ($(this).val() == '') {
                  ready = false;
                  return false;
              }
          });
          if (!ready) {
              alert("Please tell us where to send this. Either choose ship to Billing Address or fill out both the Recipient Name as well as Shipping Address fields. Thanks!");
              return false;
          }
      }
          // Makes sure age verification is checked 
          if (!$('#age_verification').is(':checked')) {
              alert("Please verify you are 21 years of age or older.");
              return false;       
          }   
        // Confirms province is allowed for wine shipping 
            var states = ["AK", "AZ", "CA", "CO", "CT", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "LA", "ME", "MD", "MI", "MN", "MO", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OR", "SC", "TN", "TX", "VT", "VA", "WA", "WV", "WI", "WY"];
                if ($.inArray($("#address_province").val(), states) &lt;0) {
                   alert("Shipping gifts containing alcohol to this state is prohibited by law. Please choose another item.");
                   return false;       
          }
   return true;
  }
  
  &lt;/script&gt;
  </code></pre>