Server side validation and isModified() method
Hi, I use Loopback for the development of a web application for my client. The framework is very rich and it has a very good documentation. Anyway, after few months using Loopback in my professional activity, I noticed the lack of 2 functionalities that could be very useful in my case and perhaps in general:
-
Server side validation for complex instances: my data structure is quite denormalized (I use MongoDB), so I use complex models where each property is an object containing other objects, arrays and so on. I had to use external modules such as Ajv JSON schema validation to define custom schemas and validation of my models.
-
I use before save hook methods to implement logic that should run when a certain property in the model has been modified. It would be great if Loopback could offer an isModified() method for a property in the current instance during update operations.
Regards,
Christian
Thanks for the comment. Could you create two new issues for each of the feature requests you're asking for? We can track them independently in the new issues. I will close this issue for now and add feature labels to the new ones you create. https://github.com/strongloop/loopback/wiki/Reporting-issues#feature-requests