vlucas/valitron — pull request #59 by petervanderdoes (2014-02-18 15:21:10+00:00)
Title: Feature/skip quit validation

Introduce two new methods:
- skip()
- quit()

With these you can skip or quit the validation process.

### Explanation skip
When the validation for that field fails, all remaining validations for that field will be skipped

```
$v = new Validator(array('num' => 5,'name' => ''));
$v->rule('required', 'num');
$v->rule('min', 'num', 6)->skip();
$v->rule('min', 'num', 7);
$v->rule('required','name');
$v->validate();
```
The $v->errors() will return
```
array(
'num' => array('Num must be greater than 6'),
'name' => array('Name is required')
)
```

### Explanation quit
When the validation for that field fails, no further validation will be done.

````
$v = new Validator(array('num' => 5,'name' => ''));
$v->rule('required', 'num');
$v->rule('min', 'num', 6)->quit();
$v->rule('min', 'num', 7);
$v->rule('required','name');
$v->validate();
````

The $v->errors() will return
```
array(
'num' => array('Num must be greater than 6'),
)
```

### Tests
Two tests have been added to `ErrorMessages.php` but this file is not run by PHPUnit.