added passes and fails method to validtor.
This commit is contained in:
parent
642b0f17f0
commit
e1c8928550
|
@ -117,6 +117,26 @@ public static function register($name, $validator)
|
||||||
static::$validators[$name] = $validator;
|
static::$validators[$name] = $validator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate the target array using the specified validation rules.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function passes()
|
||||||
|
{
|
||||||
|
return $this->valid();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate the target array using the specified validation rules.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function fails()
|
||||||
|
{
|
||||||
|
return $this->invalid();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate the target array using the specified validation rules.
|
* Validate the target array using the specified validation rules.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue