@openshift-assisted/ui-lib
Version:
React component library for the Assisted Installer UI
16 lines • 791 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostCountValidationSchema = void 0;
const tslib_1 = require("tslib");
const Yup = tslib_1.__importStar(require("yup"));
const constants_1 = require("./constants");
const hostCountValidationSchema = (t) => {
return Yup.number()
.min(constants_1.HOSTS_MIN_COUNT, t('ai:A cluster can have {{HOSTS_MIN_COUNT}} hosts at minimum.', {
HOSTS_MIN_COUNT: constants_1.HOSTS_MIN_COUNT,
}))
.max(constants_1.HOSTS_MAX_COUNT, t('ai:Maximum hosts count {{HOSTS_MAX_COUNT}} reached.', { HOSTS_MAX_COUNT: constants_1.HOSTS_MAX_COUNT }))
.required(t('ai:Required field'));
};
exports.hostCountValidationSchema = hostCountValidationSchema;
//# sourceMappingURL=validationSchemas.js.map