Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Custom form validation

Jacopo Gucciardi 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.


Jacopo Gucciardi 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

  • 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