This example show you how to customize the errors messages through input schema validation.
Check now the source code! You will find all the info there in the comments. There are also an example that explain how to write the tests!
You can run this project simply by:
cd validation-messages
npm i
npm start
NOTE: give a look also to the package.json
to find out how the scripts are done 😉