You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
textName required only if key from checkboxList is selected.
Possible Solution
The problem is in validator.php, where if control value ($value = $checkboxList->getValue()) returns empty array, it is considered as equal.
I have found problematic code in
Version: master branch
Bug Description
When using
addConditionOn()
with MultichoiceControl and the value ($multichoicecontrol->getValue()
) is empty array[]
, condition is always true.Steps To Reproduce
textName
is always required.Expected Behavior
textName
required only ifkey
from checkboxList is selected.Possible Solution
The problem is in validator.php, where if control value (
$value = $checkboxList->getValue()
) returns empty array, it is considered as equal.I have found problematic code in
forms/src/Forms/Validator.php
Line 104 in a472e9e
where
foreach
evaluates each return value. But in case of$value
is empty array,foreach
never occurs.The text was updated successfully, but these errors were encountered: