mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-31 07:01:54 +00:00
Forced stopOnFirstFail parameter to bool
This commit is contained in:
parent
8636fed8f5
commit
4103c8bd40
@ -1021,9 +1021,8 @@ class Validator
|
|||||||
* Should the validation stop a rule is failed
|
* Should the validation stop a rule is failed
|
||||||
* @param bool $stop
|
* @param bool $stop
|
||||||
*/
|
*/
|
||||||
public function stopOnFirstFail($stop) {
|
public function stopOnFirstFail($stop = true) {
|
||||||
if(!is_bool($stop)) throw new \InvalidArgumentException('Parameter of type boolean expected');
|
$this->stop_on_first_fail = (bool) $stop;
|
||||||
$this->stop_on_first_fail = $stop;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user