perbaiki kwh

This commit is contained in:
Fuzi_fauzia 2024-07-11 11:28:41 +07:00
parent dc4be31103
commit 4ae3b51530
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@
class="form-control no-arrow" class="form-control no-arrow"
id="kwh" id="kwh"
formControlName="kwh" formControlName="kwh"
maxlength="20" maxlength="15"
[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">

View File

@ -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, Validators.maxLength(20), Validators.pattern(/^[0-9]{10,15}$/)]], kwh: [this.dataRow.kwh, [Validators.required, Validators.maxLength(15), Validators.pattern(/^[0-9]{10,15}$/)]],
}); });
} }