Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/ValidationsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class FormLoopValidations extends Validations {
return;
}
page.items.filter(item => {
if (item.component === 'FormLoop' && item.config.name === this.element.config.name) {
if (item.component === 'FormLoop' && item.config.name === this.element.config.name && item !== this.element) {
siblings.push(item);
}
});
Expand Down Expand Up @@ -240,8 +240,10 @@ class PageNavigateValidations extends Validations {
*/
class FormElementValidations extends Validations {
async addValidations(validations) {
// Disable validations if field is hidden
if (!this.isVisible()) {
// When inside a loop, each row may have different data so the static isVisible()
// check (which uses only the first row's data) cannot reliably determine visibility.
// The runtime closure evaluates conditionalHide per-row with the correct data.
if (!this.insideLoop && !this.isVisible()) {
return;
}
if (this.element.config && this.element.config.readonly) {
Expand Down
Loading