mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSform : block form validation if element's errors is defined
This commit is contained in:
parent
508e898210
commit
881323f813
1 changed files with 4 additions and 0 deletions
|
@ -272,6 +272,7 @@ class LSform {
|
|||
$msg_error=getFData(_("%{label} attribute data is not valid."),$attr->getLabel());
|
||||
}
|
||||
$this -> _elementsErrors[$attr->name][]=$msg_error;
|
||||
$this -> can_validate=false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -338,6 +339,9 @@ class LSform {
|
|||
function checkData() {
|
||||
$retval=true;
|
||||
foreach ($this -> _postData as $element => $values) {
|
||||
if ($this -> definedError($element)) {
|
||||
$retval=false;
|
||||
}
|
||||
if(!is_array($values)) {
|
||||
$values=array($values);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue