I have a strange problem in a form that I am building. Hopefully it's my fault but it really seem like a bug.
I have a form with some complex validation rules so I needed to do it in JS.
But when I try to run questionDetailsForm.validate() in my code it just shows an empty object:
In the console:
form.validate() should return
false depending on whether the form passes validation. The trick is that it does so in the form of a promise, if you examine the log in your browser console you'll see something like:
If you want to access the value of it in your JS code you can use
const formValidated = await questionDetailsForm.validate()
Let me know if that works!
Thank you for the quick answer.
Yes it works perfectly.
It would be great to see this kind of detail on your new "debug" window inside the platform!
Definitely! We'll let you know here when promises are logged in more detail to the built-in debug console