Ramco Ramco

Ramco Ramco

  • 419
  • 3.4k
  • 528.1k

Error - Reactive Form Validation

Jun 5 2024 5:52 AM

Hi

  I am getting error - Parse error Missing expected ]

            <mat-form-field appearance="outline">
                <mat-label>First Name</mat-label>
                <input matInput type="text" formControlName="firstName">
                <div class="text-danger" @if="empForm.firstName.invalid && (emoForm.firstName.touched || empForm.firstName.dirty)">
                    <span @if="firstName.errors?.['required'> This is required </span>
                </div>
            </mat-form-field> 

Thanks


Answers (7)