Auto validate text box on change

A

Angela

Hello

How would one auto validate using the 'onchange' method a text box for
invalid entries?

Invalid entries would include:

1. Input string of '....'
2. Input string of 'aaaa'
2. Check to see if all entries are uppercase

Thanks greatly
 
D

Doug Miller

Hello

How would one auto validate using the 'onchange' method a text box for
invalid entries?

Invalid entries would include:

1. Input string of '....'
2. Input string of 'aaaa'
2. Check to see if all entries are uppercase

Insisting that the user type everything in uppercase is stupid. If it's
important to your application that all entries be in uppercase, then shift
everything to uppercase after it's been entered and let the user type in
lowercase if he wants to.
 
A

Angela

Doug said:
Insisting that the user type everything in uppercase is stupid. If it's
important to your application that all entries be in uppercase, then shift
everything to uppercase after it's been entered and let the user type in
lowercase if he wants to.

Sorry, maybe I need to clarify further

I want to check to see if all entries are uppercase, (which is bad),
then convert to lowercase - mybad
 
D

Doug Miller

Sorry, maybe I need to clarify further

I want to check to see if all entries are uppercase, (which is bad),
then convert to lowercase - mybad

OK, fine.

Insisting that the user type everything in lowercase is stupid. If it's
important to your application that all entries be in lowercase, then shift
everything to lowercase after it's been entered and let the user type in
uppercase if he wants to.

Sheesh.
 
T

Thomas 'PointedEars' Lahn

Angela said:
How would one auto validate using the 'onchange' method a text box for
invalid entries?

One would not, as that would not be user-friendly. Instead, one would check
the values before and after the form was submitted.

`onchange' is not a method, it is an intrinsic event handler attribute to
provide event listener code for the `change' event of an element.
Thanks greatly

You're welcome.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top