You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It also supports json paths for traits in the form of traits[foo.bar.baz] using sjson.
Examples
Include examples from sjson docs or build our own
Limitations
Nested Items
The way json schema works is that required propagates to deeper levels. If key baz of foo.bar.baz is always required, foo and bar must also be required.
When using form fields, this is very challenging to automate for us at the moment (explain here that go json schema is limited). Basically, the form payload would need to send {foo:{bar:{}}}, otherwise the only error you will see is that foo is required, which can then not be properly assigned to the actual <input name="traits[foo.bar.baz]"> because the keys do not match.
The registration form parser supports:
It also supports json paths for traits in the form of
traits[foo.bar.baz]
using sjson.Examples
Limitations
Nested Items
The way json schema works is that required propagates to deeper levels. If key
baz
offoo.bar.baz
is always required,foo
andbar
must also be required.When using form fields, this is very challenging to automate for us at the moment (explain here that go json schema is limited). Basically, the form payload would need to send
{foo:{bar:{}}}
, otherwise the only error you will see is thatfoo is required
, which can then not be properly assigned to the actual<input name="traits[foo.bar.baz]">
because the keys do not match.Workaround:
How To: Nested elements
Assuming a traits model:
You could address
name.first
this with a form name of:How To: Checkbox to boolean:
If it's not checked:
If the checkbox is checked:
If the checkbox should be toggled based on the form value (e.g. when form validation fails):
How To: Array elements
The text was updated successfully, but these errors were encountered: