src/EntityList/Commands/Command.php
public function validate(array $params, array $rules, array $messages = [])
    {
        $validator = app(Validator::class)->make($params, $rules, $messages);

        if ($validator->fails()) {
            throw new ValidationException(
                $validator, new JsonResponse($validator->errors()->getMessages(), 422)
            );
        }
    }
public function validate(array $params, array $rules, array $messages = [])
    {
        $validator = app(Validator::class)->make($params, $rules, $messages);

        if ($validator->fails()) {
            throw new ValidationException(
                $validator, new JsonResponse($validator->errors()->getMessages(), 422)
            );
        }
    }
public function validate ( array $ params , array $ rules , array $ messages = [ ] ) { $ validator = app ( Validator :: class ) -> make ( $ params , $ rules , $ messages ) ; if ( $ validator -> fails ( ) ) { throw new ValidationException ( $ validator , new JsonResponse ( $ validator -> errors ( ) -> getMessages ( ) , 422 ) ) ; } }
Validates the request in a form case.

@param array $params
@param array $rules
@param array $messages
@throws ValidationException
Validates the request in a form case .