File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 5
5
* @licence: http://www.magepow.com/license-agreement
6
6
* @author: MichaelHa
7
7
* @create date: 2019-11-29 17:19:50
8
- * @LastEditors: MichaelHa
9
- * @LastEditTime: 2019-12-04 11:05:45
8
+ * @LastEditors: ProxiBlue
9
+ * @LastEditTime: 2024-01-23
10
10
*/
11
11
12
12
namespace Magepow \Categories \Model \Config ;
@@ -22,13 +22,11 @@ class Heading extends \Magento\Framework\App\Config\Value
22
22
public function beforeSave ()
23
23
{
24
24
$ value = $ this ->getValue ();
25
- $ validator = \Zend_Validate::is (
26
- $ value ,
27
- 'Regex ' ,
25
+ $ validator = new \Laminas \Validator \Regex (
28
26
['pattern ' => '/^[\p{L}\p{N}_,;:!&#\+\*\$\?\| \'\.\-\ ]*$/iu ' ]
29
27
);
30
28
31
- if (!$ validator ) {
29
+ if (!$ validator-> isValid ( $ value ) ) {
32
30
$ message = __ (
33
31
'Please correct categories heading: "%1". ' ,
34
32
$ value
You can’t perform that action at this time.
0 commit comments