|
|
|
@ -128,7 +128,7 @@
|
|
|
|
|
this.validInternal(property.maxLength, name, o => Promise.resolve(value.length <= property.maxLength.max))
|
|
|
|
|
);
|
|
|
|
|
list.push(
|
|
|
|
|
this.validInternal(property.rangelength, name, o => Promise.resolve(value.length >= property.length.min && value.length <= property.length.max))
|
|
|
|
|
this.validInternal(property.rangeLength, name, o => Promise.resolve(value.length >= property.rangeLength.min && value.length <= property.rangeLength.max))
|
|
|
|
|
);
|
|
|
|
|
list.push(
|
|
|
|
|
this.validInternal(property.range, name, o => Promise.resolve(parseFloat(value) >= property.range.min && parseFloat(value) <= property.range.max))
|
|
|
|
@ -165,6 +165,7 @@
|
|
|
|
|
},
|
|
|
|
|
validInternal: function (validator, name, valid, message) {
|
|
|
|
|
if (validator) {
|
|
|
|
|
console.log('match:' + validator.message);
|
|
|
|
|
var vm = this;
|
|
|
|
|
message = message || validator.message;
|
|
|
|
|
return valid().then(function (value) {
|
|
|
|
|