Mobile app version of vmapp.org
Login or Join
Ravi8258870

: New to website form validation I'm new to form validation and I have been lucky over the years. I would like to update my method of form creation in my sites. I was curious to know what

@Ravi8258870

Posted in: #Forms #Javascript #Php #Validation

I'm new to form validation and I have been lucky over the years. I would like to update my method of form creation in my sites. I was curious to know what is standard and if there is a preexisting solution to my needs? My goal this week is to learn how to validate an email address and check for spam.

I can create forms in HTML5 without issues but I don't know if JavaScript form validation with PHP form validation is standard. I did run across this from my searches and appears to be a good start, but I want to know more.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi8258870

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jessie594

The linked article is from 2009. Since then some improvements have been made in regards to form validation. One being that HTML 5 already has built-in form validation, but fails in older browsers with no HTML 5 support.

Of course there are javascript libraries which helps you with the validation part like:

Parsley.js (Javascript) or
jQuery Validation Engine (Javascript) or
Validation (PHP)

I suggest you take a look on the different implementation methods and what you can do with them.

For Spam checking, well, that's another story. There aren't very good standalone libraries which are any good (at least not in my experience). Of course, you could always go with integrating the pretty awesome Akismet to detect spam after form submission or integrate some third-party services like reCAPTCHA.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme