Skip to content

Commit

Permalink
feat(EasyValidator): updateMessage 现在返回 false
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jun 25, 2019
1 parent 0c88bfb commit 02a10b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/EasyValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface EasyValidatorRuleTestFunctionActions {
*
* @param message 提示信息
*/
updateMessage(message: any): void,
updateMessage(message: any): false,
}

export interface EasyValidatorRuleTestFunction<D extends EasyValidatorData> {
Expand Down Expand Up @@ -178,6 +178,7 @@ export class EasyValidator<D extends EasyValidatorData> {
const actions: EasyValidatorRuleTestFunctionActions = {
updateMessage(comingMessage) {
message = comingMessage
return false
},
}
const result = rule.test(data, actions)
Expand Down

0 comments on commit 02a10b7

Please sign in to comment.