You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding custom validation now only implements format validation via addFormat, whether to consider adding custom types for more convenient type definitions.
Use a custom type ObjectId.
{ _id: { type: "ObjectId" } }
validation.
this is mongodb Objectid.
{_id: xxx._id}
This way to implement any type I want through a custom type.
The text was updated successfully, but these errors were encountered:
Sorry, it has been previously been proposed and it won’t be supported. Type is a special keyword in JSON Schema and Ajv processes it differently from other keywords, so redefining it would be very complex. Also I do think it’s a bad idea to redefine standard keywords - it is better to define new custom keywords via available extension mechanism.
Adding custom validation now only implements format validation via
addFormat
, whether to consider adding custom types for more convenient type definitions.Use a custom type
ObjectId
.validation.
This way to implement any type I want through a custom type.
The text was updated successfully, but these errors were encountered: