mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-30 23:01:52 +00:00
Merge pull request #178 from mprince/boolean
Add boolean rule to README & remove unnecessary ternary
This commit is contained in:
commit
37408859b8
@ -109,6 +109,7 @@ V::lang('ar');
|
|||||||
* `accepted` - Checkbox or Radio must be accepted (yes, on, 1, true)
|
* `accepted` - Checkbox or Radio must be accepted (yes, on, 1, true)
|
||||||
* `numeric` - Must be numeric
|
* `numeric` - Must be numeric
|
||||||
* `integer` - Must be integer number
|
* `integer` - Must be integer number
|
||||||
|
* `boolean` - Must be boolean
|
||||||
* `array` - Must be array
|
* `array` - Must be array
|
||||||
* `length` - String must be certain length
|
* `length` - String must be certain length
|
||||||
* `lengthBetween` - String must be between given lengths
|
* `lengthBetween` - String must be between given lengths
|
||||||
|
|||||||
@ -653,7 +653,7 @@ class Validator
|
|||||||
*/
|
*/
|
||||||
protected function validateBoolean($field, $value)
|
protected function validateBoolean($field, $value)
|
||||||
{
|
{
|
||||||
return (is_bool($value)) ? true : false;
|
return is_bool($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user