Closed bradjones1 closed 3 years ago
Looks like we're missing an object validator:
Good catch, @bradjones1.
In reviewing the validator logic, I found a few holes that I'm going to try to fill today:
object
validator (which will probably just do a typeof
check)datetime
fields should be validated with the same date
validatorunknown
validator to allow for a catch-all for validating types that don't have a registered validator (similar to the unknown
serializer concept)I'll get a new beta out after this work is done.
In the mean time, if you want a workaround to avoid the above error you can provide a custom validatorFor
function to your sources that includes a no-op validator (() => {}
) for object
.
Just published:
Wow! :rocket: Thanks!
I am working with
v0.17.0-beta.20
utilizing a json:api source pulled through an in-memory source. While syncing the record cache, the record is validated. I have a model for afile
record type, with an attribute ofobject
type specified thusly:In
SyncRecordCache::update
, the validation fails with the following issue:It appears this is related to https://github.com/orbitjs/orbit/pull/842 but as there is no documentation yet on
0.17
beyond the tests, I'm a bit stumped as to whether this is a:object
attributes in the current docs or tests)