How to validate Axios request with Express Validator?

I'm trying to figure out how to use Express Validator to validate my Axios POST request. Express Validator works perfectly when validating fields attached directly to req.body, but when using Axios, I can only seem to access the body via and this is causing problems with the validation.

Middleware in validator.js

const { validationResult } = require("express-validator");

function validator(req, res, next) {
  const errors = validationResult(req);
  if (!errors.isEmpty()) {
    return res.status(400).json({ errors: errors.array() });
  } else {

module.exports = validator;

Routes userRoutes.js

const express = require("express");
const router = express.Router();
const validator = require("../../middleware/validator");
const { body } = require("express-validator");
const { registerUser } = require("../../controllers/userController");"/register", [body("email").isEmail(), validator], registerUser);

module.exports = router;

I've tired passing directly into validationResult but just caused an error. I also tried using the check middleware from express-validator but this didn't work either.

Is there a way to validate nested fields in the body?, or perhaps a way to get Axios to attach the POST data directly to req.body not

Axios request

import axios from 'axios';

   method: "post",
   baseURL: "http://localhost:3001",
   url: "/api/users/register",
   data: {
      "email": ""

Thanks in advance! Kyle.