validationFactory->make(...$arg); if ($validator->fails()) { throw new ValidateException($validator->errors()->first(), ResponseCode::VALIDATION_ERROR); } } }