Hi,
I use loopback version 2.10.2.
I have a model with a base "PersistedModel" and defined some properties on it.
{
"name": "Hike",
"base": "PersistedModel",
"idInjection": true,
"properties": {
"title": {
"type": "string",
"required": true
},
"desc": {
"type": "string"
},
"created": {
"type": "date",
"required": true
}
},
"validations": [],
"relations": {
"author": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "authorId"
}
},
"acls": [],
"methods": []
}
Note that property created is required.
When I try to save a new object with invalid created property, the object is successfully saved & stored value for that property is null.
Here is a screenshot from api explorer with a post operation https://www.dropbox.com/s/cbdlyb0a6uv51au/save-invalid-date.png
Is it a bug?
Hi,
I use loopback version 2.10.2.
I have a model with a base "PersistedModel" and defined some properties on it.
Note that property
createdis required.When I try to save a new object with invalid
createdproperty, the object is successfully saved & stored value for that property isnull.Here is a screenshot from api explorer with a post operation https://www.dropbox.com/s/cbdlyb0a6uv51au/save-invalid-date.png
Is it a bug?