This is a npm module that validates common inputs for user registration process.
npm install auth-validations
In your javascript file,
var av = require('auth-validations');
Return error message (String). If the error message length is 0, the validation passed successfully.
Returns an array of error messages (String). If the array is empty, the validation passed successfully.
Return error message (String). If the error message length is 0, the validation passed successfully.