Created
November 2, 2017 09:29
-
-
Save QETHAN/a588c004e5d1b24a6b5bef7fd7a2f97d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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