Jump to content
Larry Ullman's Book Forums

Ch 13 'Html5 And Js'


Recommended Posts

Regarding data validation and sanatizing,

would it be considered wise to use HTML5 and Javascript data validation functions together with PHP data validation/sanatizing functions?

 

I would think yes BUT I am concerned and don't understand what implications it could have on a production site.

 

Link to comment
Share on other sites

You should always use PHP to validate user input, regardless of what client-side validation you are or aren't performing.

With that said, adding HTML5/JS validation never hurts.

 

My personal preference these days is to use the new HTML5 form attributes to perform rudimentary validation without the use of any additional custom JS validation, and then do the final (thorough) validation on the PHP side upon form submission.

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...