vendor/ipl/stdlib/src/Contract/Validator.php
raw| 1 | <?php |
| 2 | |
| 3 | namespace ipl\Stdlib\Contract; |
| 4 | |
| 5 | /** |
| 6 | * Validate values and collect error messages |
| 7 | */ |
| 8 | interface Validator |
| 9 | { |
| 10 | /** |
| 11 | * Check whether the given value is valid |
| 12 | * |
| 13 | * @param mixed $value |
| 14 | * |
| 15 | * @return bool |
| 16 | */ |
| 17 | public function isValid($value); |
| 18 | |
| 19 | /** |
| 20 | * Get the validation error messages |
| 21 | * |
| 22 | * @return string[] |
| 23 | */ |
| 24 | public function getMessages(); |
| 25 | } |