Sameer Dighe Sameer Dighe - 1 year ago 100
PHP Question

Is it better idea to put data validations on client-side as well as server-side?

what I am trying to ask is , I am using Angular in client side and laravel Api in server side. so my question is, Is it better approach to put data validations on both side.

Answer Source

Yes. You should use both.

Client side - most validations are for the user inputs (e.g. invalid characters, regular expressions, etc.)

Server side - most validations are related to business logic (e.g. user authority, use privileges, etc.)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download