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
4个Rule:MaxRule/MinRule/MaxLengthRule/MinLengthRule 的prototype.getErrorMessage,第一行都是control.get('maxErrorMessage') 这个maxErrorMessage是否是copy手误?
另外4个getErrorMessage比较一致,是否可以抽取成一个,比如: MaxRule.prototype.getErrorMessage = someMethod(control, 'maxErrorMessage'); MinRule.prototype.getErrorMessage = someMethod(control, 'minErrorMessage'); someMethod里面会return一个function。
函数内: var getErrorMessage = Rule.prototype.getErrorMessage; getErrorMessage.apply(this, arguments); 这个apply出来的,并没有赋给局部变量...是否可以存下来,最后一行return的时候,return此变量即可
The text was updated successfully, but these errors were encountered:
额这个确实是我copy的时候手误了,下个版本顺便重构一下,这块好久没动了。
Sorry, something went wrong.
了解了,多谢!
Merge pull request #40 from chestnutchen/master
e0b19ff
FIX #36
606c4b1
chestnutchen
No branches or pull requests
4个Rule:MaxRule/MinRule/MaxLengthRule/MinLengthRule
的prototype.getErrorMessage,第一行都是control.get('maxErrorMessage')
这个maxErrorMessage是否是copy手误?
另外4个getErrorMessage比较一致,是否可以抽取成一个,比如:
MaxRule.prototype.getErrorMessage = someMethod(control, 'maxErrorMessage');
MinRule.prototype.getErrorMessage = someMethod(control, 'minErrorMessage');
someMethod里面会return一个function。
函数内:
var getErrorMessage = Rule.prototype.getErrorMessage;
getErrorMessage.apply(this, arguments);
这个apply出来的,并没有赋给局部变量...是否可以存下来,最后一行return的时候,return此变量即可
The text was updated successfully, but these errors were encountered: