Answers for "how to validate express js form"


how to validate express js form

// Validation rules.var loginValidate = [  check('username', 'Username Must Be an Email Address').isEmail(),  check('password').isLength({ min: 8 })  .withMessage('Password Must Be at Least 8 Characters')  .matches('[0-9]').withMessage('Password Must Contain a Number')  .matches('[A-Z]').withMessage('Password Must Contain an Uppercase Letter')];// Process user'/login', loginValidate, (req, res) => {  // Insert Login Code Here});
Posted by: Guest on June-02-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language