Home › Forums › JavaScript › How to validate 3 textboxes by showing only single error message? › Reply To: How to validate 3 textboxes by showing only single error message?
September 27, 2013 at 12:29 am
#151366
Brad Metcalf
Participant
Kinda having trouble figuring out what exacty you mean in the second sentence. But if you want to just have one error if one of those is null then try this. Obviously var (string) = (input)
for day month and year first.
if (!day || !month || !year ) {
alert('This isn't right!');
} else {
alert('Seems legit!');
}