Added basic-tree

This commit is contained in:
2026-04-12 01:12:15 +02:00
parent c903e7bfa0
commit e3c7554ff3
6 changed files with 215 additions and 4 deletions

View File

@@ -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' }