I\'ve started to work on Javascript recently. What I am testing is checking the DoB in valid format. Next step will be checking the age.
What my HTML code includes
if(!/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{2}$/.test($(this).val())){ alert('Date format incorrect (DD/MM/YY)'); $(this).datepicker('setDate', ""); return false; }
This code will validate date format DD/MM/YY