When we’re designing forms there are some simple things to keep in mind with regards to the UX and usability side of things that will make them that much better for our audiences.
Good Usability has two very useful articles about validation and preventing issues on web forms, well worth a read.
Alistapart has an article regarding inline validation that shows us the wonderfulness of using real-time inline validation vs. validating by submission. By giving people an indication that their input is correct (or not) while they are filling in a form results in a far greater success rate and of course there is a much better experience for users.
I also came across an excellent article at UX Matters about not putting hints inside text boxes. In a nutshell: when a text field has content — whether example content or actual content — users will often perceive that field to be filled in and skip over it.
Some other excellent websites to read where UX/Usability is concerned: