perbaikan kwh
This commit is contained in:
parent
0b37bcd8ee
commit
dc4be31103
|
@ -81,7 +81,7 @@
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="kwh" style="color: #ffffff">KWH:</label>
|
<label for="kwh" style="color: #ffffff">KWH:</label>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="text"
|
||||||
class="form-control no-arrow"
|
class="form-control no-arrow"
|
||||||
id="kwh"
|
id="kwh"
|
||||||
formControlName="kwh"
|
formControlName="kwh"
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
[ngClass]="{'is-invalid': myForm.get('kwh').invalid && myForm.get('kwh').touched}"
|
[ngClass]="{'is-invalid': myForm.get('kwh').invalid && myForm.get('kwh').touched}"
|
||||||
/>
|
/>
|
||||||
<div *ngIf="myForm.get('kwh').invalid && myForm.get('kwh').touched" class="text-danger">
|
<div *ngIf="myForm.get('kwh').invalid && myForm.get('kwh').touched" class="text-danger">
|
||||||
KWH is required.
|
Please enter a valid KWH.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|
|
@ -48,7 +48,7 @@ export class AddEditMasterBuildingComponent {
|
||||||
owner: ["", Validators.required],
|
owner: ["", Validators.required],
|
||||||
address: ["", Validators.required],
|
address: ["", Validators.required],
|
||||||
phone: ["", [Validators.required, Validators.pattern(/^[0-9]{10,15}$/)]],
|
phone: ["", [Validators.required, Validators.pattern(/^[0-9]{10,15}$/)]],
|
||||||
kwh: ["", Validators.required],
|
kwh: ["", [Validators.required, Validators.maxLength(20), Validators.pattern(/^[0-9]{10,15}$/)]],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ export class AddEditMasterBuildingComponent {
|
||||||
address: [this.dataRow.address, Validators.required],
|
address: [this.dataRow.address, Validators.required],
|
||||||
phone: [this.dataRow.phone, [Validators.required, Validators.pattern(/^[0-9]{10,15}$/)]],
|
phone: [this.dataRow.phone, [Validators.required, Validators.pattern(/^[0-9]{10,15}$/)]],
|
||||||
owner: [this.dataRow.owner,Validators.required],
|
owner: [this.dataRow.owner,Validators.required],
|
||||||
kwh: [this.dataRow.kwh, Validators.required],
|
kwh: [this.dataRow.kwh, [Validators.required, Validators.maxLength(20), Validators.pattern(/^[0-9]{10,15}$/)]],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue