Borales / yii2-phone-input

Yii2 International telephone numbers
Other
135 stars 55 forks source link

Error msg doesn't show up with Bootstrap4 #67

Open Joey33 opened 3 years ago

Joey33 commented 3 years ago

With bootstrap4 when client validation fails the <div class="invalid-feedback">error msg contens</div> is still hidden. The problem is that input element is wrapped in <div class="iti iti--allow-dropdown"> parent. When moving the error msg div into the same common parent, it shows up. Then you only have to reposition <div class="iti__flag-container"> so that it stays intact when error shows up. That's how I temporarily solved it. Just to let others know in case they run into the same issue.

Matvik commented 2 years ago

With bootstrap4 when client validation fails the <div class="invalid-feedback">error msg contens</div> is still hidden. The problem is that input element is wrapped in <div class="iti iti--allow-dropdown"> parent. When moving the error msg div into the same common parent, it shows up. Then you only have to reposition <div class="iti__flag-container"> so that it stays intact when error shows up. That's how I temporarily solved it. Just to let others know in case they run into the same issue.

Can you provide usage code for this scenario? How to move error div inside plugin?