Angular Sanitazer & Validator or Backend Sanitazer & Validator?

Hello guys! How are you today?

I’ve been working with angular for a while now and I have a question that comes to me every time I write my nodeSever to serve my application and my REST API.

Should I use a Angular sanitazer and validator or Backend sanitizer and validator, like express-validator? Maybe both ? What’s the best practice and especially the safest for my application?

If we are an answer, I’m ready to listen to you.

Thank ! :smiley:

Always validate backend. Always. The front-end validation important for users so that they get immediate feedback when they’re doing something wrong, and so that data going to the backend is in a sensible shape, but it isn’t a replacement for server-side and database-level validation.

1 Like