title: Select Box Validation if Option Text Contains Select
body: <p>If I have a select box, with the text Select (Insert Type of Addon)</p>
  
  <p>For example, with the text "Select Case and Clip" as the default option as well as 5 other select boxes, I want to validate this form only if no select box contains the word "Select" in it.</p>
  
  <p>This is using Virtuemart, and there is no way to make sure the options are selected properly. </p>
  
  <p>My idea, would be to use the method above and find the value Select in an options text, on submission</p>
  
  <pre><code> &lt;select name="customPrice[0][27]" id="customPrice027"&gt;
       &lt;option value="265"&gt;Select Case &amp;amp; Clip&lt;/option&gt;
       &lt;option value="266"&gt;$25.00 - Black - Large - 1&lt;/option&gt;
       &lt;option value="267"&gt;$0.00 - Black - None - 2&lt;/option&gt;
       &lt;option value="268"&gt;$10.00 - Beige - Small - 3&lt;/option&gt;
       &lt;option value="269"&gt;$20.00 - Beige - Large - 4&lt;/option&gt;
       &lt;option value="270"&gt;$0.00 - Beige - None - 5&lt;/option&gt;
       &lt;option value="271"&gt;$10.00 - Blue - Small - 6&lt;/option&gt;
       &lt;option value="272"&gt;$20.00 - Blue - Large - 7&lt;/option&gt;
       &lt;option value="273"&gt;$0.00 - Blue - None - 8&lt;/option&gt;
       &lt;option value="274"&gt;$10.00 - Gray - Small - 9&lt;/option&gt;
       &lt;option value="275"&gt;$20.00 - Gray - Large - A&lt;/option&gt;
       &lt;option value="276"&gt;$0.00 - Gray - None - B&lt;/option&gt;
       &lt;option value="277"&gt;$20.00 - Red - Large - R&lt;/option&gt;
       &lt;option value="278"&gt;$20.00 - Olive Drab - Large - D&lt;/option&gt;
   &lt;/select&gt;
  </code></pre>
  
  <p>My issue is that this is dynamically generated, so I cannot validate and have the first option contain a 0 value.</p>
  
  <p>I think using regEx may be the way to go to find the word "Select" in my post.</p>
  
  <p>Apologize if this is stupid (I am a beginner with jQuery).</p>
  
  <p>Here is my code below, trying to just add a console message saying there is a Select box, with text containing "Select"</p>
  
  <pre><code>    $(document).ready(function () {
  
         if ($("select").indexOf("Select") &gt;= 1) {
            console.log('Select is Selected');
         }       
  
      });
  </code></pre>
  
  <p>Any pointers here? I'd also like this to also validate upon submit button press, before allowing it to do so.</p>
  
  <h2>Update:</h2>
  
  <p>My code is dependent and has to stop the form submission, on selection of the button. I know the ID, Type, Name, Title and Value of the submission button (pre-defined)</p>
  
  <p>This is one out of 6 boxes, all same condition fits and triggers this message.</p>
  
  <p>Here is my code, it isn't stopping on submit. I can send a link in private message if need be for the site example.</p>
  
  <pre><code>     $(document).ready(function () {
  
         $( ".addtocart-button" ).click(function() {
  
          if($("option:contains('Select')").length){
             event.preventDefault();
             console.log("Select found");
          }
  
  
      });
  </code></pre>
  
  <p>});</p>