If you have an application with multiple tables in a database, server-side validation can be just a bunch of constraints (part of the design of your data table). We might think that we do not have any kind of check on the server side, because this is not the average server level, but the database level restrictions.
Then we can say, having the advantage of a relational database - based on Integrity (we know that our data structure is safe). In most cases, we can only use client-side validation to provide the client with feedback on an instance of his actions. Perhaps it is not an important issue to not have additional verification at the server level, in the controllers in any code on the server side.
Thus, we can say that for some / most cases we can only use client-side validation. Server-side validation is a special case, for example: checking that something has already been purchased when a customer submits a purchase form.
It is not a bad idea not to repeat yourself with confirmation from both sides.
Of course, there are applications that require a lot of attention to their data, then not only server-side validation is important (for example, part of the security of the business model, but also testing coverage for most use cases) for client input.
But if this is just a site with several forms ... Then I believe that database restrictions and client-side validation are a good choice.
ses
source share