Created
November 2, 2017 08:40
-
-
Save QETHAN/cb577bb9b69725ab979ac132ed7a6361 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(() => { | |
if (!Number.isInteger(value)) { | |
callback(new Error('请输入数字值')); | |
} else { | |
callback() | |
} | |
}, 1000); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment