An example application to demonstrate validation in LoopBack.
This application shows how to add validation in a LoopBack application. It exposes /coffee-shops
endpoints to create/read/update/delete a CoffeeShop instance with the in-memory storage.
- CoffeeShop model
- Shows how to add validation using AJV
- ValidatePhoneNumInterceptor and CoffeeShopController
- Shows how to add reusable validation logic in interceptors
Start the app:
npm start
The application will start on port 3000. Open http://localhost:3000/explorer in your browser. You can try to test the validation for the /coffee-shops
endpoints.