Could backend validation be avoided for "please type to confirm" delete pattern?

Viewed 61

I'd like to have the community opinion about a specific scenario regarding frontend and backend validation.

Online is full of resources that explain why for REST APIs should always be present both backend and frontend validation. I'm implementing a modal that ask the user to insert its email to enable the deletion of a critical resource. That information is just used to enable the delete button, is not something that I need to store somewhere. Should this information be passed to the backend to perform also the backend validation?

My personal idea is that is always a good idea having both frontend and backend validation but I'm trying to understand how much in this case having backend validation could be worthless.

1 Answers

You are right. Backend validation is to ensure data that is going to be stored or processed in any way satisfies the conditions. It can be used in machine 2 machine communication as well.

In your case it's just an attention check.

Related