Added basic-tree
This commit is contained in:
@@ -2,8 +2,9 @@ import * as F from '@efforting.tech/data/field-configuration-factories';
|
||||
|
||||
const s = new F.Schema({
|
||||
foo: F.value(123, 'The value'),
|
||||
bar: F.factory((t) => `Field ${t.field_name} was not set`, 'The factory'),
|
||||
});
|
||||
bar: F.factory((t) => `Field ${t.name} was not set`, 'The factory'),
|
||||
rq: F.required('Anything. Just not nothing.'),
|
||||
}, 'Some schema');
|
||||
|
||||
|
||||
console.log(s.load()) // { foo: 123, bar: 'Field bar was not set' }
|
||||
|
||||
Reference in New Issue
Block a user