Topic: Custom form validation

Gucciardi priority asked 2 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 2 months ago


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


Gucciardi priority answered 2 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

  • ForumUser: Priority
  • 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