From: Vincent Vanwaelscappel Date: Mon, 17 Jan 2022 15:21:22 +0000 (+0100) Subject: wip #5027 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=173f9196509124e34e5778d77c4db2b5254ef3dc;p=cubist_cms-back.git wip #5027 --- diff --git a/src/app/Magic/Fields/Field.php b/src/app/Magic/Fields/Field.php index a098b1b..689767d 100644 --- a/src/app/Magic/Fields/Field.php +++ b/src/app/Magic/Fields/Field.php @@ -34,6 +34,7 @@ class Field implements \ArrayAccess protected $_suffix = null; protected $_placeholder = null; + protected $_pattern = null; protected $_adminType = 'text'; protected $_viewNamespace = 'crud::fields'; @@ -151,7 +152,7 @@ class Field implements \ArrayAccess 'can' => $this->_can, 'can_write' => $this->_canWrite, 'auth' => $this->_auth, 'database_type' => $this->_databaseType, 'database_unique' => $this->_databaseUnique, 'database_index' => $this->_databaseIndex, 'database_default' => $this->_databaseDefault, 'database_length' => $this->_databaseLength, 'fake' => false, 'store_in' => 'extras', 'attributes' => [], - 'placeholder' => $this->_placeholder, + 'placeholder' => $this->_placeholder, 'pattern' => $this->_pattern, ]; } @@ -195,7 +196,7 @@ class Field implements \ArrayAccess { $res = []; - $fieldAttributes = ['placeholder', 'rows']; + $fieldAttributes = ['placeholder', 'rows', 'pattern']; foreach ($this->_attributes as $k => $v) { if (null === $v) {