March 23, 2012
Stop user from progressing in a multi-step jQuery form if datepicker value is blank
Question by methuselah
How would I validate the “date picker” field on step 3 of my multi-step jQuery form. Right now the field just checks if $(‘#datepicker’).val() is empty by sending an alert but still lets the user carry on until the next stage. How do you prevent the user from carrying on if the field is blank?
It can be found here: http://jsfiddle.net/xSkgH/28/
Thanks in advance!