if (/^([0-9]|[12]\d|3[0-1])$/.test(30) === false) {
alert('Day is invalid or empty');
}
if (/^([0-9]|[4]\d|1[0-2])$/.test(4) === false) {
alert('Month is invalid or empty');
}
if (/^(19|20)\d{2}$/.test('1986') === false) {
alert('Year is invalid or empty');
}
No comments:
Post a Comment