The proposal is create a validation for date fields.
Today the timestamp fields like created_at, updated_at are using BSON/UTCDateTime type.
But if we want to create another field with date type, we don't have any rule to validate that UTCDateTime type. Even we don't have a transformer that receive a date and convert to UTCDateTime to save on mongo.
So the proposal here is that, create a validation type for dates and a way to convert the date before save.
The proposal is create a validation for date fields. Today the timestamp fields like
created_at
,updated_at
are usingBSON/UTCDateTime
type. But if we want to create another field with date type, we don't have any rule to validate thatUTCDateTime
type. Even we don't have a transformer that receive a date and convert toUTCDateTime
to save on mongo.So the proposal here is that, create a validation type for dates and a way to convert the date before save.