Topic: How to stop display valid-feedback and invalid-feedback in validation?

slavaveto free asked 3 years ago


Expected behavior

Actual behavior

Resources (screenshots, code snippets etc.)


Michał Duszak staff answered 3 years ago


Hello,

delete valid-feedback and invalid-feedback elements from the form.

Thank you for choosing MDB,

Keep Coding,

Michal


slavaveto free commented 3 years ago

Hello Michal, thank you for your answer! But I guess i have to clarify my question: of course, if you delete valid-feedback and invalid-feedback elements from the form, they stop appearing. But unfortunately, all INPUT elements are SHIFTED! As if those elements are not displayed, but the shift between the input fields occurs!

How to make it so that not only to remove feedback elements but also to make sure that there is no shift.

Thanks in advance!


Michał Duszak staff commented 3 years ago

Hello. There is .was-validated class in form element after you submit the form. Upon deleting this class, all validation changes in styles are gone (shifts, borders, text feedback). To prevent shifting inputs (you mean margins, yes?) you can style it with CSS, adding margin-bottom: 0; to .form-control:valid and .form-control:invalid selectors. See this snippet: https://mdbootstrap.com/snippets/standard/m-duszak/3294611#css-tab-view



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: MacBook
  • Browser: Chrome
  • OS: MacOs
  • Provided sample code: No
  • Provided link: No