There was a discussion regarding this topic - https://www.wix.com/corvid/forum/community-discussion/check-the-validity-of-all-input-in-one-go
Here is a test, for validating a page that only has text inputs.
If all inputs are valid (their only requirement is to be filled), then the button should be enabled.
This page has only 3 input boxes, but it seems like only one of the boxes triggers this condition.
Here is the code:
let textElements = $w(“TextInput”);
textElements.onChange((event) =>{
if (textElements.validity.valid){
$w(‘#button1’).enable();
}
else {
$w(‘#button1’).disable()
}
})
The code basically checks (hopefully), whenever there is a change in any of the text inputs, if all inputs are valid.
What could possibly be the problem? This is a single simple case, but it can help with understanding the rule.
Thank you!