Issues

Select view

Select search mode

 
37 of 37

Mandatory Field Validation Bypassed When Skip Logic is Applied

Description

Description:
When a concept marked as mandatory is hidden using skip logic, the form allows submission even if the mandatory field is not filled. This bypasses the expected validation behavior.


Steps to Reproduce:

  1. Create a new form on the Demo/Dev Lite instance.

  2. Add the following fields:

    • Date Dispensed (mandatory)

    • Visit Type (mandatory)

    • Test Status (mandatory)

    • Tumor Maximum Dimension

    • Widal Test

  3. Apply the following skip logic on the Visit Type field to show/hide Test Status:

    function(form) { var selectedValues = form.get('Visit type').getValue(); if (selectedValues) { form.get('Test status').setHidden(false); } else { form.get('Test status').hideAndClear(); } }

  4. Save and publish the form.

  5. Create a patient and start a visit.

  6. Open the form and fill in:

    • Date Dispensed

    • Visit Type

    • Leave Test Status empty

  7. Click Save.


Expected Result:
Form should not be saved because Test Status is marked as mandatory and left empty.


Actual Result:
Form is saved successfully, even though the mandatory field Test Status was not filled.

Attachments

1
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Priority

Created last week
Updated last week

Activity

Show:

Flag notifications