[Bug]: 'Required' Field Validation in JSON Form Not Working Correctly If Fields Are Hidden #28018
Closed
1 task done
Labels
Bug
Something isn't working
Community Reported
issues reported by community members
High
This issue blocks a user from building or impacts a lot of users
JSON Form
Issue / features related to the JSON form wiget
Needs Triaging
Needs attention from maintainers to triage
Production
QA Pod
Issues under the QA Pod
QA
Needs QA attention
Widget Validation
Issues related to widget property validation
Widgets & Accelerators Pod
Issues related to widgets & Accelerators
Widgets Product
This label groups issues related to widgets
Is there an existing issue for this?
Description
If we have 2 fields and want to alternatively make them required and visible, based on the selection from a dropdown, the Required validation does not work as expected and the Submit button stays disabled.
It seems that once a field was marked as Required and it gets programmatically hidden, the Required mark does not get removed programmatically as it should (it ignores the JS condition).
See the screen recording and sample app for more details.
Front thread
Steps To Reproduce
{{formData.Type == "Red"}}
and visibility js put{{formData.Type == "Red"}}
{{formData.Type == "Blue"}}
and visibility js put{{formData.Type == "Blue"}}
Public Sample App
https://app.appsmith.com/app/jsonform-validation-required/page1-65280f6880b32971dff37e3c
Environment
Production
Issue video log
https://www.loom.com/share/50c7b4b6562544dfa598216aa82094fc
Version
Cloud v1.9.40
The text was updated successfully, but these errors were encountered: