Exemplo n.º 1
0
 /**
  * Create a new Validator instance.
  *
  * @param array $data
  * @param array $rules
  * @param array $customAttributes
  * @return Validator
  */
 public function make(array $data, array $rules, array $customAttributes = array())
 {
     // The presence verifier is responsible for checking the unique and exists data
     // for the validator. It is behind an interface so that multiple versions of
     // it may be written besides database. We'll inject it into the validator.
     $validator = new Validator($this->messages, $data, $rules, $customAttributes);
     if (!is_null($this->verifier)) {
         $validator->setPresenceVerifier($this->verifier);
     }
     $this->addExtensions($validator);
     return $validator;
 }