I am new to JavaScript with absolutely little idea about the language. I am trying to put an age restriction in a job application form where for the date of birth text field, date format is dd/mm/yyyy and applicants must be at between 15 and 80 years old at the time they fill in the form otherwise they won't be able to apply. I do not want to embed it into HTML file but write it in .js file only.
for DOB input type is text, name is dob, id is dob, pattern is (0[1-9]|1[0-9]|2[0-9]|3[01])/(0[1-9]|1[012])/[0-9]{4}
Thank you.