Form Validation
Hi,
Is there a method to trigger form validation manually? like the one which gets triggered on-submit and on-next action. We tried the below snipped
Formio.createForm(document.getElementById('formio'), 'https://examples.form.io/example').then(function(form) { form.on('change', function(value) {
console.log(value.isValid); // This will tell you if it is valid. }); var isValid = form.checkValidity(form.submission.data); // Or you can check it manually with. });
Both these values returns true no matter when its called. Can you please some reference to how to achieve this.
Thanks
Hello,
This should be working as expected. Could you please send a form embed code of an example of the form where this is not working so we can further investigate?
Hi,
Please find the below file for reference.
Validate button will check the form validity and display the result on screen. Even when the form is not filled, it will output true.
Hello,
the .txt file you replied with was empty when I tried to open.
Please send the form embed which can be found on the form within the Form.io portal under the 'Embed' tab https://www.screencast.com/t/LxfwpJgchhV.
Alternatively, you can send a jsfiddle of the issue occurring.
Thanks!
Hello, the .txt file you replied with was empty when I tried to open. Please send the form embed which can be found on the form within the Form.io portal under the 'Embed' tab https://www.screencast.com/t/LxfwpJgchhV. Alternatively, you can send a jsfiddle of the issue occurring.