Created
December 24, 2018 03:29
-
-
Save gyng/c686b58739cdb3b337aafc13fa30abfe to your computer and use it in GitHub Desktop.
Form definition language sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// translate this to json | |
{ | |
name: cou, | |
version: 1, | |
pages: [ | |
{ | |
page: 1, | |
contents: [somesec, y, z] | |
} | |
], | |
sections: [ | |
{ | |
id: somesec, | |
elements: [ | |
y, | |
] | |
} | |
], | |
elements: [ | |
{ | |
id: x, | |
type: PostalCodeToAddress | |
}, | |
{ | |
id: y, | |
type: Text, | |
validations: [ | |
{ type: required } | |
], | |
options: { | |
what: foo | |
} | |
}, | |
{ | |
id: z, | |
type: Custom, | |
options: { | |
resolve: "@src/lib/field/whatever", props: { foo: 1, bar: 2 } | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment