Jump to content
Larry Ullman's Book Forums

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...