Node.js 登录表单验证:支持用户名和邮箱双登录
//定义验证登录表单数据的规则对象 exports.login_schema = { body: { login: { username: { notEmpty: true, errorMessage: 'Username is required' }, email: { notEmpty: true, errorMessage: 'Email is required' } }, password: { notEmpty: true, errorMessage: 'Password is required' } } }
AI 优化版
原文地址:https://www.cveoy.top/t/topic/qhX3 著作权归作者所有。请勿转载和采集!