diff --git a/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.html b/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.html
index 7610773..7842f52 100644
--- a/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.html
+++ b/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.html
@@ -14,6 +14,7 @@
class="form-control"
id="name"
formControlName="name"
+ maxlength="50"
/>
diff --git a/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.ts b/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.ts
index 6721819..0dcede8 100644
--- a/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.ts
+++ b/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.ts
@@ -37,10 +37,10 @@ export class AddEditMasterBuildingComponent {
this.myForm = this.fb.group({
name: ["", Validators.required],
statusId: [0, Validators.required],
- email: ["", Validators.required],
+ email: ["", [Validators.required, Validators.email]],
owner: ["", Validators.required],
address: ["", Validators.required],
- phone: ["", Validators.required],
+ phone: ["", [Validators.required, Validators.pattern("^[0-9]*$")]],
kwh: ["", Validators.required],
});
}
@@ -50,10 +50,10 @@ export class AddEditMasterBuildingComponent {
id: this.dataRow.id,
name: this.dataRow.name,
statusId: this.dataRow.statusId,
- email: this.dataRow.email,
+ email: [this.dataRow.email, [Validators.required, Validators.email]],
owner: this.dataRow.owner,
address: this.dataRow.address,
- phone: this.dataRow.phone,
+ phone: [this.dataRow.phone, [Validators.required, Validators.pattern("^[0-9]*$")]],
kwh: this.dataRow.kwh,
});
}
diff --git a/src/app/content/hemat-app/master/master-room/add-edit-master-room/add-edit-master-room.component.html b/src/app/content/hemat-app/master/master-room/add-edit-master-room/add-edit-master-room.component.html
index 4f22560..02b92d0 100644
--- a/src/app/content/hemat-app/master/master-room/add-edit-master-room/add-edit-master-room.component.html
+++ b/src/app/content/hemat-app/master/master-room/add-edit-master-room/add-edit-master-room.component.html
@@ -14,6 +14,7 @@
class="form-control"
id="name"
formControlName="name"
+ maxlength="50"
/>
@@ -35,6 +36,7 @@
class="form-control"
id="description"
formControlName="description"
+ maxlength="50"
/>