We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schema.validate({ name: 'pengjiyuan is a nice boy', age: 24, email: 'pengjiyuan@bytedance.com', ip: '127.0.0.1', url: 'https://bytedancecom', custom: 20, async: 20 }, (errors) => { console.log(errors); /* * { * value: 'pengjiyuan is a nice boy', type: 'string', message: '最大长度是10' }, * age: { value: 24, type: 'number', message: '在2和5之间' }, * url: { value: 'https://bytedancecom', type: 'url', message: 'url格式不对' }, * custom: { value: 20, type: 'custom', message: '不能大于10!' } * } */ });
schema.validate(data, callback),如果 schema 中没有 asyncValidate 那么 callback 是不是同步回调呢
The text was updated successfully, but these errors were encountered:
No branches or pull requests
schema.validate(data, callback),如果 schema 中没有 asyncValidate 那么 callback 是不是同步回调呢
The text was updated successfully, but these errors were encountered: