|
@@ -117,6 +117,26 @@ class 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.
|
|
|
*
|