diff options
author | Christian Klinger | 2016-07-19 15:15:41 +0200 |
---|---|---|
committer | Christian Klinger | 2016-07-19 15:15:41 +0200 |
commit | fe5ffb4c6c5e6e5af8e3708d1b9a06c2e026a3c2 (patch) | |
tree | 0d0a95417c45487b35b1ebce4a9827f380413f4e /modules-available/baseconfig/inc/validator.inc.php | |
parent | Merging some refactoring + new filter functionality. (diff) | |
download | slx-admin-fe5ffb4c6c5e6e5af8e3708d1b9a06c2e026a3c2.tar.gz slx-admin-fe5ffb4c6c5e6e5af8e3708d1b9a06c2e026a3c2.tar.xz slx-admin-fe5ffb4c6c5e6e5af8e3708d1b9a06c2e026a3c2.zip |
use bootstrap-multiselect for multilist and selectize for multiinput.
Diffstat (limited to 'modules-available/baseconfig/inc/validator.inc.php')
-rw-r--r-- | modules-available/baseconfig/inc/validator.inc.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules-available/baseconfig/inc/validator.inc.php b/modules-available/baseconfig/inc/validator.inc.php index 23debd2c..00e8c0e0 100644 --- a/modules-available/baseconfig/inc/validator.inc.php +++ b/modules-available/baseconfig/inc/validator.inc.php @@ -29,12 +29,17 @@ class Validator return self::validateList($data[1], $displayValue); case 'function': return self::$data[1]($displayValue); + case 'multilist': + return self::validateList($data[1], $displayValue); + case 'multiinput': + return self::validateMultiInput($data[1], $displayValue); default: Util::traceError('Unknown validation method: ' . $data[0]); } return false; // make code inspector happy - doesn't know traceError doesn't return } + /** * Validate linux password. If already in $6$ hash form, * the unchanged value will be returned. @@ -82,4 +87,11 @@ class Validator return false; } + private static function validateMultiInput(&$list, &$displayValue) + { + return $displayValue; + //die("validateMultiInput: " . print_r($list, true) . ", disp = " . $displayValue); + //return implode('~,~', $displayValue); + /* TODO: DO I have to do validation */ + } } |