1 | <?php namespace Limoncello\Validation\Validator; |
||
30 | trait Values |
||
31 | { |
||
32 | /** |
||
33 | * @return RuleInterface |
||
34 | */ |
||
35 | 6 | protected static function isRequired() |
|
36 | { |
||
37 | 6 | return new Required(); |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return RuleInterface |
||
42 | */ |
||
43 | 4 | protected static function isNull() |
|
47 | |||
48 | /** |
||
49 | * @return RuleInterface |
||
50 | */ |
||
51 | protected static function notNull() |
||
57 | |||
58 | /** |
||
59 | * @param string $pattern |
||
60 | * |
||
61 | * @return RuleInterface |
||
62 | */ |
||
63 | 1 | protected static function regExp($pattern) |
|
67 | |||
68 | /** |
||
69 | * @param null|int $min |
||
70 | * @param null|int $max |
||
71 | * |
||
72 | * @return RuleInterface |
||
73 | */ |
||
74 | 3 | protected static function between($min = null, $max = null) |
|
78 | |||
79 | /** |
||
80 | * @param null|int $min |
||
81 | * @param null|int $max |
||
82 | * |
||
83 | * @return RuleInterface |
||
84 | */ |
||
85 | 7 | protected static function stringLength($min = null, $max = null) |
|
89 | } |
||
90 |