How do I get Form Validation state? like $('#form-id&#0


Topic: How do I get Form Validation state? like $('#form-id').validation() ? I do need to return a true or false

ktakiya pro premium priority asked 3 years ago

Expected behavior Hi team,

Can I know how to get the state after form validation is okay to submit? Thank you so much!

Actual behavior

Resources (screenshots, code snippets etc.)


Michał Duszak staff answered 3 years ago

Hello,

it highly depends on your approach. In examples given in our docs, the checkValidity() method actually returns a boolean value. See the snippet below:https://mdbootstrap.com/snippets/standard/m-duszak/3583860#js-tab-view

It's a basic form validation in which we console.log() the checkValidity() returned value.


ktakiya pro premium priority commented 3 years ago

Thank you so much, Yes, I already found it in documents.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: Mac
  • Browser: FF
  • OS: MacOS
  • Provided sample code: No
  • Provided link: No