javascript - Date of birth validation issues -


i'm having issue date of birth validation. seems work fine in chrome/firefox etc doesn't work in ie. we'd format of dob 01/01/2017 example or 1/1/2017 ie accept 01/01/17 reason.

<form name="patientdetailsform" action="/savecustomer" method="post"> <input name="dob" class="optionalbox form-control-small" id="dob"  required="required" type="text" maxlength="10" pattern="^(?:(?:31(\/)(?:0? [13578]|1[02]))\1|(?:(?:29|30)(\/)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2- 9]\d)? \d{2})$|^(?:29(\/)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579] [26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/)(?: (?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$" value="01/12/1985"  autocomplete="off" minlength="10" maxlength="10"> <button class="button" type="submit" value="save">save customer</button> </form> 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -