Open spadesM opened 4 years ago
Hi
I have issue about validation on steps. How can I check validation on steps with next buttons? When I was doing like below, I am getting required errors but when I fill one field it's not showing any mandatory messages.
next(cnt: number) { this.form.controls.supplierId.markAsDirty(); this.form.controls.asnNo.markAsDirty(); this.form.controls.expectedDate.markAsDirty(); this.form.controls.documentNo.markAsDirty(); this.form.controls.carrierName.markAsDirty(); this.form.controls.carrierTrackNr.markAsDirty(); this.form.markAllAsTouched(); this.form.updateValueAndValidity(); return; }
next(cnt: number) {
this.form.controls.supplierId.markAsDirty(); this.form.controls.asnNo.markAsDirty(); this.form.controls.expectedDate.markAsDirty(); this.form.controls.documentNo.markAsDirty(); this.form.controls.carrierName.markAsDirty(); this.form.controls.carrierTrackNr.markAsDirty(); this.form.markAllAsTouched(); this.form.updateValueAndValidity(); return; }
Hi
I have issue about validation on steps. How can I check validation on steps with next buttons? When I was doing like below, I am getting required errors but when I fill one field it's not showing any mandatory messages.
next(cnt: number) {
this.form.controls.supplierId.markAsDirty(); this.form.controls.asnNo.markAsDirty(); this.form.controls.expectedDate.markAsDirty(); this.form.controls.documentNo.markAsDirty(); this.form.controls.carrierName.markAsDirty(); this.form.controls.carrierTrackNr.markAsDirty(); this.form.markAllAsTouched(); this.form.updateValueAndValidity(); return; }