title: Send Post Request with CURL in Node.js And Validation Error
body: <p>I have one project. The project coding with TypeScript and Node.js. I am using Joi dependency for field required.</p>
  <p>When i send post request with <em>curl</em>, i have a validation error.</p>
  <p>Here is my curl send in vscode powershell terminal</p>
  <pre><code>curl.exe \-d '{&quot;email&quot;: &quot;abc@gmail.com&quot;, &quot;name&quot;: &quot;Furkan&quot;, &quot;surname&quot;: &quot;Kulaksiz&quot;, &quot;password&quot;: &quot;12345678&quot;, &quot;passwordConfirmation&quot;: &quot;12345678&quot;}' -H &quot;Content-Type: application/json&quot; -X POST localhost:3000/register
  </code></pre>
  <p>I change position of options.</p>
  <p>While i send this request, i have a validation error.</p>
  <pre><code>ERROR] 23:08:00 ValidationError: &quot;email&quot; is required. &quot;name&quot; is required. &quot;surname&quot; is required. &quot;password&quot; is required. &quot;passwordConfirmation&quot; is required
  </code></pre>
  <p>My User Model</p>
  <pre><code>import{ Schema, model, Document } from 'mongoose'
  
  interface UserDocument extends Document {
      email: string,
      name: string,
      surname: string,
      password: string
  }
  
  const userSchema = new Schema({
      email: String,
      name: String,
      surname: String,
      password: String
  }, {
      timestamps: true
  })
  
  export const User = model&lt;UserDocument&gt;('User', userSchema)
  </code></pre>
  <p>Here is my validation file</p>
  <pre><code>import Joi from '@hapi/joi'
  
  export const registerSchema = Joi.object({
  
      email: Joi.string().min(8).max(254).lowercase().trim().required(),
      name: Joi.string().min(2).max(50).trim().required(),
      surname: Joi.string().min(2).max(50).trim().required(),
      password: Joi.string().min(8).max(128).required(),
      passwordConfirmation: Joi.valid(Joi.ref('password')).required()
  })
  </code></pre>
  <p>How can i fix.?</p>