How to Implement Server-Side Data Validation Process

Posted by franchiset on 18-Aug-2017 10:33


How can we implement data validations at the server side, to confirm the data's validity just before creating, updating or deleting the data in the database?

Firstly, as a best practice, we don't want to rely solely on the KUIB app to validate the data (i.e. just accept what is coming in and update the database). A developer could miss something (especially since we are new to the KUIB) or something could cause the web app to not work as intended (deployed incorrectly, malware).

Secondly, there are times where complex validations are more suited to being performed at the server side. For example, if a sales rep is to be assigned to a new customer, there may be business rules that mean only certain reps can be assigned to the customer (e.g. that the sales rep's territory covers the customer's location, or the sales rep is from a group that manages the type of new customer, etc.).

We see the client side validation using the Kendo.ui.validator in This will be useful for doing simple client-side validations. However, when the data comes into the back-end, we still want to confirm that required data is present, that the values make sense (like the right sales rep being assigned to a customer), etc. before updating the database.

* Are there any examples of how a server-side validation would be implemented?

* If the validation fails, how would an error message be returned and displayed in the KUIB app?

* At what points in the Business Entity would we splice in a call to our server-side validation process?

Thank you.



All Replies

This thread is closed