cloud-ide-model-schema
Version:
Pachage for schema management of Cloud IDEsys LMS
34 lines (33 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MRegister = void 0;
/* INTERFACE END */
/* MODEL START */
var MRegister = /** @class */ (function () {
function MRegister(init) {
Object.assign(this, init);
}
MRegister.prototype.Validate = function () {
var _a, _b;
var errorLogger = [];
if (!this.user_username) {
errorLogger.push({
control: "user_username",
message: "Username is Required"
});
}
/* if password is selected by user */
if (this.user_password) {
/* Check wether length is in between 8 to 50 or not */
if (((_a = this.user_password) === null || _a === void 0 ? void 0 : _a.length) < 8 || ((_b = this.user_password) === null || _b === void 0 ? void 0 : _b.length) > 50) {
errorLogger.push({
control: "user_password",
message: "Password is Invalid!"
});
}
}
return errorLogger;
};
return MRegister;
}());
exports.MRegister = MRegister;