Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I validate a credit card exp date (2 fields) with livevalidation
    primarykey
    data
    text
    <p>using <a href="http://livevalidation.com" rel="nofollow">http://livevalidation.com</a> on a custom PHP donation page. I want to make credit card exp dates in the past invalid, but all other selections valid. I'm using two select fields for the month and year.</p> <p>Seems like this should be done with the validate.custom or validate.now functions, but there are no good examples in the documentation on these. Can't seem to get them to work...</p> <pre><code>&lt;select tabindex="4" id="exp_month" name="exp_month"&gt; &lt;option value="01"&gt;01&lt;/option&gt; &lt;option value="02"&gt;02&lt;/option&gt; &lt;option value="03"&gt;03&lt;/option&gt; &lt;option value="04"&gt;04&lt;/option&gt; &lt;option value="05"&gt;05&lt;/option&gt; &lt;option value="06"&gt;06&lt;/option&gt; &lt;option value="07"&gt;07&lt;/option&gt; &lt;option value="08"&gt;08&lt;/option&gt; &lt;option value="09"&gt;09&lt;/option&gt; &lt;option value="10"&gt;10&lt;/option&gt; &lt;option value="11"&gt;11&lt;/option&gt; &lt;option value="12"&gt;12&lt;/option&gt; &lt;/select&gt; &lt;select tabindex="5" id="exp_year" name="exp_year"&gt; &lt;option value="11"&gt;2011&lt;/option&gt; &lt;option value="12"&gt;2012&lt;/option&gt; &lt;option value="13"&gt;2013&lt;/option&gt; &lt;option value="14"&gt;2014&lt;/option&gt; &lt;!-- etc --&gt; &lt;/select&gt; &lt;script&gt; var exp_year = new LiveValidation( "exp_year", { validMessage: " ", failureMessage: "Enter a valid exp date", onlyOnSubmit: true } ); exp_year.add( Validate.Custom( // ???? ); &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload