validation to insert data into DB

A

Anonymous

Guest
Honestly you should use both. Client side validations are there to help a genuine user to enter the right data. Server side validations are mostly there to protect the server from malicious users.

...what if i wanna insert an email into a database, and javascript validation passed and it's a valid email, should i use a further server side validation?...
YES. if it passed js validation that means we have helped the user to enter the right data. We still need server side validations to protect the server/application from malicious users.
 
Back
Top