Skip to content

Commit b60e67d

Browse files
cursoragentBaspa
andcommitted
Fix: Correct conditional logic for empty and not empty operators
Co-authored-by: bspbaspa <[email protected]>
1 parent bd5c715 commit b60e67d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Fields/Logic/ConditionalLogicApplier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public static function applyConditionalValidation($input, ?Field $field = null):
8383
} elseif ($operator === 'not_equals' && $value !== null) {
8484
$input->requiredUnless($conditionalFieldName, $value);
8585
} elseif ($operator === 'is_empty') {
86-
$input->requiredUnless($conditionalFieldName, '');
87-
} elseif ($operator === 'is_not_empty') {
8886
$input->requiredIf($conditionalFieldName, '');
87+
} elseif ($operator === 'is_not_empty') {
88+
$input->requiredUnless($conditionalFieldName, '');
8989
}
9090

9191
break;

0 commit comments

Comments
 (0)