UNPKG

@up-group/react-controls

Version:

We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get

26 lines 967 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ValidationManager = (function () { function ValidationManager() { this.ErrorControl = []; } ValidationManager.prototype.addControl = function (control) { this.ErrorControl.push(control); }; ValidationManager.prototype.isValidValue = function (value) { var newValue = value; for (var i = 0; i < this.ErrorControl.length; i++) { var result = this.ErrorControl[i].isValidValue(value); if (result.hasError) { return result; } else if (result.correctValue !== undefined) { newValue = result.correctValue; } } return { hasError: false, errorMessage: null, correctValue: newValue }; }; return ValidationManager; }()); exports.default = ValidationManager; //# sourceMappingURL=ValidationManager.js.map