title: Mongoose: validation failed: address: Path `address` is required., description: Path `description` is required., name: Path `name` is required."
body: <p>I am taking course online and when I implemented a code it gaves me path node found error. I changed my code to exact code in the tutorial but it still giving error. Below is the implemented code and the snippets of error I am facing:</p>
  <p><strong>bootcampModel.js</strong></p>
  <pre><code>const mongoose = require('mongoose')
  
  const bootcampSchema = new mongoose.Schema({
    name: {
      type: String,
      required: [true, 'Please enter a name'],
      unique: true,
      trim: true,
      maxlength: [50, 'Name cannot be more than 50 characters'],
    },
    slug: String,
    description: {
      type: String,
      required: [true, 'Please enter description'],
      maxlength: [500, 'Description cannot be more than 500 characters'],
    },
    website: {
      type: String,
      match: [
        /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&amp;//=]*)/,
        'Please enter a valid URL with HTTP or HTTPS',
      ],
    },
    phone: {
      type: String,
      maxlength: [20, 'Phone number cannot exceed 20 characters'],
    },
    email: {
      type: String,
      match: [
        /^(([^&lt;&gt;()[\]\\.,;:\s@&quot;]+(\.[^&lt;&gt;()[\]\\.,;:\s@&quot;]+)*)|(&quot;.+&quot;))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
        'Please enter valid email',
      ],
    },
    address: {
      type: String,
      required: [true, 'Please enter address'],
    },
    location: {
      type: {
        type: String,
        enum: ['Point'],
      },
      coordinates: {
        type: [Number],
        index: '2dsphere',
      },
      formattedAddress: String,
      street: String,
      city: String,
      state: String,
      zipcode: String,
      country: String,
    },
    careers: {
      type: [String],
      required: true,
      enum: [
        'Web Development',
        'Mobile Development',
        'UI/UX',
        'Data Science',
        'Other',
      ],
    },
    averageRating: {
      type: Number,
      min: [1, 'Rating must be atleast 1'],
      max: [10, 'Rating cannot exceed 10'],
    },
    averageCost: Number,
    photo: {
      type: String,
      default: 'no-photo.jpg',
    },
    housing: {
      type: Boolean,
      default: false,
    },
    jobAssistance: {
      type: Boolean,
      default: false,
    },
    jobGuarrantee: {
      type: Boolean,
      default: false,
    },
    acceptGi: {
      type: Boolean,
      default: false,
    },
    createdAt: {
      type: Date,
      default: Date.now(),
    },
  })
  
  module.exports = mongoose.model('Bootcamp', bootcampSchema)
  </code></pre>
  <p><strong>bootcampController.js</strong></p>
  <pre><code>exports.createBootcamp = async (req, res, next) =&gt; {
    try {
      const bootcamp = await Bootcamp.create(req.body)
      res.status(201).json({ success: true, data: bootcamp })
    } catch (err) {
      res.status(400).json({ success: false, error: err.message })
    }
  }
  </code></pre>
  <p><strong>routes.js</strong></p>
  <pre><code>router.route('/').post(createBootcamp)
  </code></pre>
  <p>When I call this api using postman with following data:</p>
  <pre><code>{
      &quot;name&quot;: &quot;Devcentral Bootcamp&quot;,
      &quot;description&quot;: &quot;Is coding your passion? Codemasters will give you the skills and the tools to become the best developer possible. We specialize in front end and full stack web development&quot;,
      &quot;website&quot;: &quot;https://devcentral.com&quot;,
      &quot;phone&quot;: &quot;(444) 444-4444&quot;,
      &quot;email&quot;: &quot;enroll@devcentral.com&quot;,
      &quot;address&quot;: &quot;45 Upper College Rd Kingston RI 02881&quot;,
      &quot;careers&quot;: [
          &quot;Mobile Development&quot;,
          &quot;Web Development&quot;,
          &quot;Data Science&quot;,
          &quot;Business&quot;
      ],
      &quot;housing&quot;: false,
      &quot;jobAssistance&quot;: true,
      &quot;jobGuarantee&quot;: true,
      &quot;acceptGi&quot;: true
  }
  </code></pre>
  <p>It gaves me following error</p>
  <pre><code>{
      &quot;success&quot;: false,
      &quot;error&quot;: &quot;Bootcamp validation failed: address: Path `address` is required., description: Path `description` is required., name: Path `name` is required.&quot;
  }
  </code></pre>
  <p>Following is the display of postman where I am calling my api:</p>
  <p><a href="https://i.stack.imgur.com/FZFE0.png" rel="nofollow noreferrer">postman</a></p>
  <p><em>Can anyone find out where I am lacking?</em></p>