orbitjs / orbit

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

Introduce autoValidate setting for RecordCache and RecordSource #915

Closed dgeb closed 2 years ago

dgeb commented 2 years ago

This setting mirrors autoUpgrade and autoActivate in that if it is left undefined it should be treated as true.

RecordCache and RecordSource use this to determine whether to build validators if none are provided.

SyncRecordCache and AsyncRecordCache also use this option to control whether a schema validation processor is included by default.

This will provide more fine-tuned control over whether validators are built and used by a source / cache than checking Orbit.debug.

Closes #903

Note: This is considered a breaking change because Orbit.debug is no longer used to implicitly set autoValidate.