geddy / model

Datastore-agnostic ORM in JavaScript
265 stars 55 forks source link

Can pass string to date datatype #201

Open OscarGodson opened 10 years ago

OscarGodson commented 10 years ago

I was able to find and update a records created_on property which I have set to date to value "test". Probably should fail if new Date() would fail or its not even a number.

mde commented 10 years ago

I just added a test for this -- I get the expected isValid of false when trying to set a date datatype property to a random string: 78d7f034a090b4d7e541230fc924a4e3699b785b And I see the expected property name in the errors object.