Skip to content

Commit 1b67593

Browse files
committed
build
1 parent e6422a3 commit 1b67593

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

dist/vue-formly.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-formly v2.2.0
2+
* vue-formly v2.2.1
33
* https://github.com/matt-sanders/vue-formly
44
* Released under the MIT License.
55
*/
@@ -777,7 +777,13 @@ return /******/ (function(modules) { // webpackBootstrap
777777
var label = 'templateOptions' in _this.field && 'label' in _this.field.templateOptions ? _this.field.templateOptions.label : '';
778778
validatorMessage = (0, _util.parseValidationString)(validKey, validatorMessage, label, model[_this.field.key]);
779779

780-
var valid = typeof validator == 'function' ? !validator(field, model) : !eval(validator);
780+
var valid = false;
781+
if (typeof validator === 'function') {
782+
valid = !validator(field, model);
783+
} else {
784+
var res = new Function('model', 'field', 'return ' + validator + ';');
785+
valid = !res.call({}, model, field);
786+
}
781787
(0, _util.setError)(_this.form, _this.field.key, validKey, valid, validatorMessage);
782788
});
783789
}

0 commit comments

Comments
 (0)