JavaScript Form Validation Help?

Yo, i was wondering If anyone can help me with basic js xhtml form validation?

Probably someone can.

Are you planning on doing the validation only is JS? I'm sure you're not but if you are, I would advise strongly against it, do validation in both JS and your chosen server based language.

It's actually for an assignment. The requirements are to simply make a bunch of forms in xhtml (done) Then, for example, make sure the name input box only accepts 38 alpha chars and hyphens.

I would start by stating a question, and showing some code.

Are you allowed to use Jquery?


Otherwise you're going to have to use a regular expression, there are thousands on stack overflow.