1 | <?php |
||
16 | class Name implements ValidatorInterface |
||
17 | { |
||
18 | /** |
||
19 | * pattern for name |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | |||
24 | protected $_pattern = '^(([a-zA-Z0-9]\s)*([a-zA-Z0-9])){3,100}$'; |
||
25 | |||
26 | /** |
||
27 | * get the pattern |
||
28 | * |
||
29 | * @since 4.3.0 |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | |||
34 | public function getPattern() : string |
||
38 | |||
39 | /** |
||
40 | * validate the user |
||
41 | * |
||
42 | * @since 4.3.0 |
||
43 | * |
||
44 | * @param string $name name to be validated |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | |||
49 | public function validate(string $name = null) : bool |
||
53 | } |
||
54 |