@floydspace/ngx-validation
Version:
angular 2, 4 set of custom validation directives
15 lines • 509 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var forms_1 = require("@angular/forms");
var lang_1 = require("../util/lang");
exports.gt = function (gt) {
return function (control) {
if (!lang_1.isPresent(gt))
return null;
if (lang_1.isPresent(forms_1.Validators.required(control)))
return null;
var v = +control.value;
return v > +gt ? null : { gt: true };
};
};
//# sourceMappingURL=validator.js.map
;