make() public method

Initialize validator
public make ( array $formData, array $rules, array $messages = [] ) : Laracasts\Validation\ValidatorInterface
$formData array
$rules array
$messages array
return Laracasts\Validation\ValidatorInterface
 /**
  * Validate the form data
  *
  * @param array $formData
  * @return mixed
  * @throws FormValidationException
  */
 public function validate(array $formData)
 {
     $this->validation = $this->validator->make($formData, $this->getValidationRules(), $this->getValidationMessages());
     if ($this->validation->fails()) {
         throw new FormValidationException('Validation failed', $this->getValidationErrors());
     }
     return true;
 }
 function it_accepts_a_command_object_in_lieu_of_an_input_array(FactoryInterface $validatorFactory, ValidatorInterface $validator)
 {
     $formDataAsCommand = new CommandStub();
     $formDataCastToArray = get_class_vars(get_class($formDataAsCommand));
     $validatorFactory->make($formDataCastToArray, $this->getValidationRules(), [])->willReturn($validator);
     $this->validate($formDataAsCommand)->shouldReturn(true);
 }
 function it_throws_an_exception_for_invalid_form_data(FactoryInterface $validatorFactory, ValidatorInterface $validator)
 {
     $fakeFormData = ['username' => ''];
     $validatorFactory->make($fakeFormData, $this->getValidationRules(), [])->willReturn($validator);
     $validator->fails()->willReturn(true);
     $validator->errors()->willReturn([]);
     $this->shouldThrow('Laracasts\\Validation\\FormValidationException')->duringValidate($fakeFormData);
 }