Validator
Learn to validate user input using the AdonisJs validation provider.
We'll cover the following...
The validation provider in AdonisJs is used to validate user input. Let’s create a form to submit the username and email and see how we can use the validator provider to check the validity of the user input and display errors.
Using the validation provider
'use strict' class TestController { getForm({ view }) { return view.render('form') } postForm() { return 'Form submitted!' } } module.exports = TestController
Press Run and wait for the output to be displayed in the Output tab. You will see a form in which username ...