@berish/validate
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -98,2 +98,3 @@ "use strict"; | ||
}; | ||
rule.upgradeErrorText = callback => _createRule(Object.assign(Object.assign({}, params), { errorText: callback }), body); | ||
registrator_1.addRule(rule); | ||
@@ -100,0 +101,0 @@ return pluginSystem_1.callPlugin(rule, (plugin, rule) => pluginSystem_1.useUpgradeRuleAfterInit(plugin, rule)); |
import { IRuleFlag } from './createRuleFlag'; | ||
import { SYMBOL_ERROR_TEXT_DEFAULT } from './createRule'; | ||
export interface IRuleObject { | ||
@@ -23,2 +24,3 @@ target: any; | ||
revertError: (ruleName?: string, errorText?: (obj: IRuleObject & IRuleObjectBody<Body> & IRuleObjectFlag) => IRuleErrorTextResult) => IValidateRule<Body>; | ||
upgradeErrorText: (callback: (obj: IRuleObject & IRuleObjectBody<Body> & IRuleObjectFlag) => IRuleErrorTextResult | typeof SYMBOL_ERROR_TEXT_DEFAULT) => IValidateRule<Body>; | ||
} |
{ | ||
"name": "@berish/validate", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Validation of complex objects with support for validation maps, rules and decorators", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
80727
984