title: Mongoose Schemme is not validating
body: <p>I am using mongoose db and have a schema for adding cars to a table, but it seems my entries are not being checked just added straight in? It should show a warring in the terminal or at least just not allow me to add the records.</p>
  <p>I cant seem to find anything online about the problem.</p>
  <pre><code>const mongoose = require('mongoose');
  const carTypes = `Avensis,Corolla,Yaris`.split(`,`);
  let carsSchema = new mongoose.Schema(
      {
          model: { type: String, enum: carTypes },
          colour: { type: String },
          year: { type: Number, min: 2002 - 02 - 09, max: 2020 - 02 - 09 },
          price: { type: Number, min:1000, max:100000 }
      },
      {
          collection: `cars`
      }
  );
  module.exports = mongoose.model(`cars`, carsSchema);
  </code></pre>
  <p>My other file router page is as follows.</p>
  <pre><code>const router = require(`express`).Router()
  const carsModel = require(`../models/cars`)
  // read all records
  router.get(`/cars/`, (req, res) =&gt; 
  {   
      carsModel.find((error, data) =&gt; 
      {
          res.json(data)
      })
  })
  // Read one record
  router.get(`/cars/:id`, (req, res) =&gt; 
  {
      carsModel.findById(req.params.id, (error, data) =&gt; 
      {
          res.json(data)
      })
  })
  // Add new record
  router.post(`/cars/`, (req, res) =&gt; 
  {
      carsModel.create(req.body, (error, data) =&gt; 
      {
          res.json(data)
      })
  })
  // Update one record
  router.put(`/cars/:id`, (req, res) =&gt; 
  {
      carsModel.findByIdAndUpdate(req.params.id, {$set: req.body}, (error, data) =&gt; 
      {
          res.json(data)
      })        
  })
  // Delete one record
  router.delete(`/cars/:id`, (req, res) =&gt; 
  {
      carsModel.findByIdAndRemove(req.params.id, (error, data) =&gt; 
      {
          res.json(data)
      })       
  })
  module.exports = router
  </code></pre>
  <p>My machine is mac is it something todo with my mongoose set up? The data does add to the database!</p>