Sridhar_Rao
In the zone
I have a form with 25 text boxes, named t1, t2, t3...t25. I expect the user to enter a single alphabet in capitals. When the user submits the button, I expect to check all the 25 elements for the following:
is it empty?
is it in capitals?
is the length of text restricted to 1?
is the input in numericals or symbols?
If found unacceptable, an alert displaying the error be made and focus sent to that field.
I can code to check each element one by one but that would result in repetition of same code 25 times, is there a way to do it in few lines?
is it empty?
is it in capitals?
is the length of text restricted to 1?
is the input in numericals or symbols?
If found unacceptable, an alert displaying the error be made and focus sent to that field.
I can code to check each element one by one but that would result in repetition of same code 25 times, is there a way to do it in few lines?