How to display error message when string entered together with the characters outside the A-Z a-z 0-9?
Ruizz
0
Newbie Poster
Recommended Answers
Jump to PostTry these:
<input type="text" id="txt1" name="txt1" size="20" value="" onchange="if (!/[A-Za-z\d]/.test(this.value)) alert('Invalid data!');" />
All 3 Replies
essential
84
Posting Shark
Featured Poster
Ruizz
0
Newbie Poster
essential
84
Posting Shark
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.