mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-17 15:59:06 +01:00
LSform/LSformRule: Handle rule without options or message
This commit is contained in:
parent
3298320b3d
commit
531991a1e5
1 changed files with 5 additions and 0 deletions
|
@ -253,6 +253,11 @@ class LSattribute extends LSlog_staticLoggerClass {
|
|||
$check_data = $this -> getConfig('check_data', array());
|
||||
if(is_array($check_data)) {
|
||||
foreach ($check_data as $rule => $rule_options) {
|
||||
// Handle rule without options or message
|
||||
if (is_int($rule) && is_string($rule_options)) {
|
||||
$rule = $rule_options;
|
||||
$rule_options = array();
|
||||
}
|
||||
// Check rule
|
||||
if(!is_empty($rule) && !$form -> isRuleRegistered($rule)) {
|
||||
LSerror :: addErrorCode('LSattribute_03', array('attr' => $this->name, 'rule' => $rule));
|
||||
|
|
Loading…
Reference in a new issue