title: Validation on optional Parameter using class-validator in nestjs?
body: <p>I want to apply validation on request payload like, there is field name with string type. But name is not compulsory field but if it exist it must execute <code>@IsNotEmpty()</code></p>
  
  <p>I tried something like this
  <code>@IsNotEmpty() name?: string</code> // it not considering <code>?</code> optional constraint</p>