Using a Hook to Extend the Validator
Discover how to use hooks in AdonisJs to extend the built-in validator by adding custom validation rules. This lesson guides you through creating a rule that restricts certain strings in a username, enhancing input validation in your full-stack web applications.
We'll cover the following...
We'll cover the following...
According to the Adonis documentation, hooks can be used to execute code at a specific time in the application lifecycle. We register hooks inside start/hooks.js.