Topic: Use variable for form validation error message
christso pro asked 6 years ago
<div class="md-form mt-0 input-group"> <input formControlName="amount" class="form-control" type="number" class="form-control" id="amount" mdbInputDirective [data-error]="getErrorMessage()"> </div>However, the message shows as the default message "wrong". It seems that variables are not supported. How do I get the error message from Angular instead of hardcoding it in the html?
Arkadiusz Idzikowski staff answered 6 years ago
christso pro answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.3
- Device: Laptop
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No