feat: Небольшой рефакторинг. Ограничение длинны значения в поле ввода
This commit is contained in:
parent
f599a68529
commit
e5e0b6735f
5 changed files with 56 additions and 40 deletions
|
|
@ -16,6 +16,7 @@ class Field
|
|||
public $error = false;
|
||||
public $require = false;
|
||||
public $hint = null;
|
||||
public $maxlength = null;
|
||||
public $fieldset = null;
|
||||
// Блоки (Убрать в отдельный класс!!!)
|
||||
public $_title = array();
|
||||
|
|
@ -33,7 +34,7 @@ class Field
|
|||
$this->fieldset = $input['fieldset'];
|
||||
}
|
||||
// Инициализация свойст обьетка
|
||||
foreach (['label', 'name', 'type', 'description'] as $name) {
|
||||
foreach (['label', 'name', 'type', 'description', 'maxlength'] as $name) {
|
||||
if (isset($input[$name])) {
|
||||
$this->$name = $input[$name];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue