Topic: only hide success indicator on input
Laudick pro asked 6 years ago
Hello everyone,
I'm having a little question according to the input validation indicator of MDB. I want my input to turn red if it's invalid but I don't want it to turn green if it's valid. What is the most simple way to achieve this?
Thanks in advance for helping me out, here is a code example:
<input mdbInputDirective type="text" name="username" id="username" class="form-control" formControlName="username" data-success=" " i18n-data-error="@@LOGIN_REQUIRED" data-error="*Required">
Laudick pro answered 6 years ago
Thank you for the fast response, too bad that there is currently no way to achieve this. As a little workarround I just disabled the integrated validation and added counter-error manually when needed. I would be glad to see a feature that allows you to separately disable success/error validation in the future.
Damian Gemza staff commented 6 years ago
Dear Laudick, We'll think about this in future, but I can't provide you any ETA on this functionality. Best Regards, DamianFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Resolved
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: Yes
- Provided link: No
Tags
Damian Gemza staff commented 6 years ago
Dear Laudick, For now, there's no possibility to achieve your desired behavior. Currently, mdbInputDirective validation checks if the element got counter-success class (this class is used to mark input as valid). If the element hasn't got that class, directive adds counter-success class to it. So you can't achieve your desired behavior. We'll think about implementing similar functionality in the future. Best Regards, Damian