title: Postman raw data works but form-data not works on POST request in node
body: <p>I'm facing some problem when using postman. When I'll try to send raw data in JSON(application/json) format, it get success.</p>
  
  <p><a href="https://i.stack.imgur.com/vcKhB.png" rel="noreferrer">Postman sending post request and succeded</a></p>
  
  <p>But when I'll try to send form data it returns some error.</p>
  
  <pre><code>{
      "error": {
          "errors": {
              "name": {
                  "message": "Path `name` is required.",
                  "name": "ValidatorError",
                  "properties": {
                      "message": "Path `{PATH}` is required.",
                      "type": "required",
                      "path": "name"
                  },
                  "kind": "required",
                  "path": "name",
                  "$isValidatorError": true
              },
              "price": {
                  "message": "Path `price` is required.",
                  "name": "ValidatorError",
                  "properties": {
                      "message": "Path `{PATH}` is required.",
                      "type": "required",
                      "path": "price"
                  },
                  "kind": "required",
                  "path": "price",
                  "$isValidatorError": true
              }
          },
          "_message": "Product validation failed",
          "message": "Product validation failed: name: Path `name` is required., price: Path `price` is required.",
          "name": "ValidationError"
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/iRMnz.png" rel="noreferrer">Postman errors</a></p>
  
  <p>And here is my project code snippets</p>
  
  <p><strong>product.js</strong></p>
  
  <pre><code>import express from 'express';
  import mongoose from 'mongoose';
  import Product from '../models/product.model';
  
  router.post('/', (req, res, next) =&gt; {
      const product = new Product({
          _id: new mongoose.Types.ObjectId(),
          name: req.body.name,
          price: req.body.price
      });
      product.save().then(result =&gt; {
          console.log(result);
          res.status(201).json({
              message: 'Created product successfully',
              createdProduct: {
                  name: result.name,
                  price: result.price,
                  _id: result._id,
                  request: {
                      type: 'GET',
                      url: `http://localhost:3000/products/${result._id}`
                  }
              }
          });
      }).catch(err =&gt; {
          console.log(err);
          res.status(500).json({
              error: err
          });
      });
  });
  </code></pre>
  
  <p><strong>product.model.js</strong></p>
  
  <pre><code>import mongoose from 'mongoose';
  
  const productSchema = mongoose.Schema({
      _id: mongoose.Schema.Types.ObjectId,
      name: {type: String, required: true},
      price: {type: Number, required: true}
  });
  
  module.exports = mongoose.model('Product', productSchema);
  </code></pre>