Skip to content

bugfix/FOUR-27646 First Financial Bank - Validation Rules for Hidden Required Fields Inside Loops Are Inconsistently Applied - #1913

Open
gustavobascope wants to merge 5 commits into
developfrom
bugfix/FOUR-27646
Open

bugfix/FOUR-27646 First Financial Bank - Validation Rules for Hidden Required Fields Inside Loops Are Inconsistently Applied#1913
gustavobascope wants to merge 5 commits into
developfrom
bugfix/FOUR-27646

Conversation

@gustavobascope

@gustavobascope gustavobascope commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

First Financial Bank - Validation Rules for Hidden Required Fields Inside Loops Are Inconsistently Applied

Expected behavior:
Hidden required fields should not be validated.
Validation should only apply to inputs that are visible and active at the time of submission.

Actual behavior:
When the screen loads, all three loop instances are created (because the default count is 3).
Even if the input fields are hidden (checkbox unchecked), the system still tries to validate them.
As a result:

Clicking Submit triggers “The field is required” errors for all hidden inputs.
If you check only the second or third checkbox and fill that input, the hidden ones still fail validation.
If you check and fill only the first input, the form submits successfully — even though the others remain hidden and empty.

This makes validation inconsistent depending on which iteration is visible or filled.

Solution

Added isVisible and insideLoop validation
image

How to Test

Create a new screen.

Add a Loop container loop_1.
Set Default Loop Count: 3

Inside loop_1, add:

A Checkbox form_checkbox_1.
A Required Line Input form_input_1.

For the Visibility Rule of form_input_1, set:

form_checkbox_1
(so the input only appears when the checkbox is checked).
Add a Submit button outside the loop.

In Preview mode:

Leave all checkboxes unchecked
Click Submit → all hidden required fields fail validation.
Check only the second or third checkbox and fill the input → hidden instances still fail validation.
Check and fill only the first instance → submission succeeds, even if other hidden fields exist.

Related Tickets & Packages

https://processmaker.atlassian.net/browse/FOUR-27646

ci:deploy

@cypress

cypress Bot commented Jun 1, 2026

Copy link
Copy Markdown

screen-builder    Run #2336

Run Properties:  status check passed Passed #2336  •  git commit 72c7e2c0cc: bugfix/FOUR-27646 First Financial Bank - Validation Rules for Hidden Required Fi...
Project screen-builder
Branch Review bugfix/FOUR-27646
Run status status check passed Passed #2336
Run duration 10m 05s
Commit git commit 72c7e2c0cc: bugfix/FOUR-27646 First Financial Bank - Validation Rules for Hidden Required Fi...
Committer gustavobascope
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 19
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 389
View all changes introduced in this branch ↗︎

@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-68e5301433.engk8s.processmaker.net

1 similar comment
@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-68e5301433.engk8s.processmaker.net

@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-68e5301433.engk8s.processmaker.net

1 similar comment
@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-68e5301433.engk8s.processmaker.net

@processmaker-sonarqube

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-68e5301433.engk8s.processmaker.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants