From 173f9196509124e34e5778d77c4db2b5254ef3dc Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 17 Jan 2022 16:21:22 +0100 Subject: [PATCH] wip #5027 --- src/app/Magic/Fields/Field.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) { -- 2.39.5