1 | <?php |
||
23 | class Ip extends AbstractRule |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * Contains the rule failure message |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $message = 'The field is not a valid IP address.'; |
||
32 | |||
33 | /** |
||
34 | * Returns true if the given value is a valid IP address |
||
35 | * |
||
36 | * @param mixed $value Value to validate |
||
37 | * @param string $field Unused by this rule |
||
38 | * @param array $allFields Unused by this rule |
||
39 | * |
||
40 | * @return bool |
||
41 | * |
||
42 | * @since 2.0 |
||
43 | */ |
||
44 | 12 | public function validate($value, $field = null, $allFields = null) |
|
48 | |||
49 | } |
||
50 |