Topic: Angular MDB password validation problem.
Piotr Adamus asked 7 years ago
Hi,I've started using MDB Angular and i tried to make simple login form, i just copied your example from forms documentation, but i encountered some problem. In my input field with type password, validation doesn't work, it looks like that input needs minimum length of 2 characters including one number. Otherwise it has red color and error message "wrong" is present. In my angular formControl object it look's ok, valid field has true value .I don't know what's going wrong, mby i made some mistake during configuration ?
PS. How i can disable that validation ? For example if i don't need this green or red validation indicators ?
<div class="md-form"> <i class="fa fa-lock prefix grey-text"></i> <input type="password" formControlName="orangeFormPass" id="orangeForm-pass" class="form-control" mdbInputDirective> <label for="orangeForm-pass">Your password</label> </div>
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: Yes
- Provided link: No
Damian Gemza staff commented 7 years ago
Dear Piotr Adamus, Red / Green indicators comes from mdbInputDirective validation. There are some basic validations wrote with RegEx. If you want to use your custom RegEx, you have to add a control customRegex to your input element. Also if you want to disable red / green indicators & validation from mdbInputDirective, please use [mdbValidate]="false" control. Everything is described here: https://mdbootstrap.com/mdbinputdirective/ Best Regards, Damian