Custom form validation


Topic: Custom form validation

Gucciardi pro premium priority asked 8 months ago

Expected behavior I would like to explicitly call the form.checkValidity() method and perform other tasks before and after the validation event.

Actual behavior Despite addind the "novalidate" attribute to the form, the default validation tooltips are displayed along side the MDB validation messages.

Resources (screenshots, code snippets etc.) enter image description here

https://mdbootstrap.com/snippets/standard/gucciardi/6078362


Kamila Pieńkowska staff answered 8 months ago

You've added form.reportValidity(); that counteracts novalidate.


Gucciardi pro premium priority answered 8 months ago

You are right, my bad. Removing form.reportValidity(); works fine.


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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 7.2.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: Yes