Skip to content

Instantly share code, notes, and snippets.

@QETHAN
Created November 2, 2017 09:29
Show Gist options
  • Save QETHAN/a588c004e5d1b24a6b5bef7fd7a2f97d to your computer and use it in GitHub Desktop.
Save QETHAN/a588c004e5d1b24a6b5bef7fd7a2f97d to your computer and use it in GitHub Desktop.
const checkTime = (rule, value, callback) => {
if (!value) {
return callback(new Error('时间不能为空'));
}
setTimeout(() => {
console.log(value)
if (!Number.isInteger(value * 1)) {
callback(new Error('请输入整数值'));
} else {
callback()
}
}, 200);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment