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