Boolean value for isCashOnDelivery throwing error

In order schema, I mentioned a Boolean like {isCashOnDelivery: true}, but it’s throwing me error
By saying Invalid scheme configuration: ‘True’ is not a valid type at path isCashOnDelivery.

What can be the bug ?

Schema accepts type as Boolean not as true or false !
If possible share some part of code !

It’s solved. I should have typed
isCashOnDelivery : { type : Boolean, default: true}
Instead of isCashOnDelivery: true

1 Like