orbitjs / orbit

Composable data framework for ambitious web applications.
https://orbitjs.com
MIT License
2.33k stars 134 forks source link

Fix sharing of validatorFor function between record sources and caches, and memory sources and forks #848

Closed dgeb closed 3 years ago

dgeb commented 3 years ago

As pointed out by @SafaAlfulaij, the new validatorFor functions have not been automatically shared between record sources and their caches. Furthermore they were not shared between memory sources and their forks (generated via fork()). Therefore, validations may have inadvertently been happening at one layer but not the other. This PR resolves this by always passing validatorFor settings along unless an alternative was explicitly provided.

Thanks again for bringing this to my attention @SafaAlfulaij!