Topic: How to add custom errors to Angular Reactive forms
prudhviakella asked 6 years ago
Hi,
How can I change custom validation error for the angular reactive form dynamically?
I mean to ask
<div class="md-form form-sm">
<i class="fa fa-envelope prefix"></i>
<label for="LoginFormEmail">Your email</label>
<input mdbInputDirective type="text" class="form-control" formControlName="LoginFormEmail" data-error="E-mail address seems to be invalid" data-success="What a good e-mail" id="LoginFormEmail">
<div *ngIf="LoginFormEmailget.touched && LoginFormEmailget.invalid" class="alert alert-danger">
</div>
the above code is always throwing E-mail address seems to be invalid.
Add comment
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Open
Specification of the issue
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No