DEVPPL
http://www.devppl.com/forum/

Form Validation
http://www.devppl.com/forum/viewtopic.php?f=49&t=13692
Page 1 of 1

Author:  hbradshaw [ Sat Jun 13, 2009 11:54 am ]
Post subject:  Form Validation

Hello:

I could use some help. I have a form where I'm having people enter URL's into textboxes that should not contain URL's.

How can I write a form validation script where I can check that each textbox field does NOT have a URL in it?

For example, the phone number textbox field should only accept a valid phone number (###) ###-####. The name textbox field should only contain letters (no numbers or characters).

Can someone help me write something?

Thank you.

Author:  rangana [ Mon Jun 22, 2009 7:58 am ]
Post subject:  Re: Form Validation

You need to learn RegularExpression to make thins easier for you.

You might find these links a good way to start :
http://www.devarticles.com/c/a/JavaScri ... ns-Part-1/
http://www.javascript-coder.com/html-fo ... tion.phtml
http://www.javascriptkit.com/javatutors/re.shtml

Hope that helps you write somethuing for yourself.

If you're stumped, get back and we're more than willing to offer a hand :)

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/