I plan to create an app with Hapi.js/strongloop backend, and with angularjs frontend.
Since both BE frameworks have some kind of model validation (Joi for Hapi, and Strongloop's own validation), I thought that it would be great to use these validation schemas on the frontend.
Is this possible at all? If yes, how can I migrate the joi/strongloop validation libraries to the client?
What is fixed: we will use AngularJS for the frontend.
What we have: data validation shemas defined in Joi.
What I would like to do: use the same schemas from AngularJS (without calling actual methods on the server)
Currently we need to call a REST method (for example the Create method) to validate the form data with joi (or write the same validation twice). We would like to change this so that the frontend can validate the form data without contacting the server.
Is there a way to use the joi NodeJS library in AngularJS? If it is not possible, then is there another solution?