mongodb validation error path is required code example Example: Error: ValidationError:: Path `` is required. just remove required: true