False by default When enabled, changing a node's value will not trigger a validation instantly. the user will have to manually call validate on the node to compute errors.
controls if an node of type option
with no value
should be initially set to the first option
False by default
Format is disabled until core fixes the js regexes sent.
We formely had issues in production with ruby patterns such as \p{Katakana}
and \p{Hiragana}
which didn't translated into a valid regex.
Tells the library what to do when a node is being
created using a path that was already taken.
the path pointer will always point to the last created node unless throw
is used.
Here is where we pass validators used for the frontend validation process. by nature a validator returns instantly a validation error or null but since it receives the node as an argument, it's also possible to act asynchronously on the node if the validation process requires an external api or network call.
validators: {
...defaultValidators,
customValidator,
}
A few examples validators that come with the lib are presenceValidator, lengthValidator and formatValidator
Updates the shared context updating passing a single object as the first argument merges the object and retriggers every watcher on sharedContext while using a key/value retriggers only watchers that looks for the changed value.
Decorations are applied once when the node is constructed later.
Normally, the where
condition should not receive parameters from outside
the function scope if the value is dynamic
chainable Decorator
Generated using TypeDoc
This class is used to pass down a shared context accessible from all points of the framework and outside of it. The instance being shared is simply passed down through a SchemaNode's parameter so it's accessible at every level.