LSformElement::supannCompositeAttribute: fix checking components value

LSformRule :: validate_values() expected an array of values and not a 
unique value
This commit is contained in:
Benjamin Renard 2023-05-24 12:00:51 +02:00
parent c97d47ac00
commit 99f83f326d
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -472,7 +472,7 @@ class LSformElement_supannCompositeAttribute extends LSformElement {
if (isset($cconf['check_data']) && is_array($cconf['check_data'])) {
LSsession :: loadLSclass('LSformRule', null, true);
foreach($cconf['check_data'] as $ruleType => $rconf) {
$cerrors = LSformRule :: validate_values($ruleType, $value, $rconf, $this);
$cerrors = LSformRule :: validate_values($ruleType, array($value), $rconf, $this);
if (is_array($cerrors))
foreach ($cerrors as $cerror)
$errors[] = getFData(