mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
LSformElement::jsonCompositeAttribute: fix checking non-multiple components value
This commit is contained in:
parent
27ad049ac7
commit
341f555e0c
1 changed files with 6 additions and 1 deletions
|
@ -398,7 +398,12 @@ class LSformElement_jsonCompositeAttribute extends LSformElement {
|
||||||
// Apply check data rules
|
// Apply check data rules
|
||||||
LSsession :: loadLSclass('LSformRule', null, true);
|
LSsession :: loadLSclass('LSformRule', null, true);
|
||||||
foreach($this -> getComponentConfig($c, 'check_data', array(), 'array') as $ruleType => $rconf) {
|
foreach($this -> getComponentConfig($c, 'check_data', array(), 'array') as $ruleType => $rconf) {
|
||||||
$errors = LSformRule :: validate_values($ruleType, $value, $rconf, $this);
|
$errors = LSformRule :: validate_values(
|
||||||
|
$ruleType,
|
||||||
|
$this -> getComponentConfig($c, 'multiple', false, 'bool')?$value:array($value),
|
||||||
|
$rconf,
|
||||||
|
$this
|
||||||
|
);
|
||||||
if (is_array($errors)) {
|
if (is_array($errors)) {
|
||||||
$retval = false;
|
$retval = false;
|
||||||
foreach ($errors as $error) {
|
foreach ($errors as $error) {
|
||||||
|
|
Loading…
Reference in a new issue