cloud-ide-lms-model
Version:
Package for Model management of Cloud IDEsys LMS
28 lines (27 loc) • 855 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MPinCodeSelect = void 0;
/* INTERFACE END */
/* MODEL START */
class MPinCodeSelect {
constructor(init) {
Object.assign(this, init);
}
Validate() {
var _a;
let errorLogger = {};
if (!this.sypin_pincode) {
errorLogger.sypin_pincode = "Pin Code is Required!";
}
else if (!this.sypin_id && !this.sypin_pincode) {
errorLogger.sypin_id = "Pin Code ID is Required!";
}
else if (this.sypin_pincode) {
if (((_a = this.sypin_pincode) === null || _a === void 0 ? void 0 : _a.length) < 5) {
errorLogger.sypin_pincode = "Pin Code must be 5 characters";
}
}
return errorLogger;
}
}
exports.MPinCodeSelect = MPinCodeSelect;