Fixes a problem where Field was allowed as a child of Box or as the content of a UI by itself. The implementation assumes elsewhere that Field is always a child of Form and so the validation should uphold that.
Note: We should revisit the decision to require Field always being a child of a Form later since it would make sense to allow Box within forms as well for positioning. But this requires a validation refactor.
Fixes a problem where
Field
was allowed as a child ofBox
or as the content of a UI by itself. The implementation assumes elsewhere thatField
is always a child ofForm
and so the validation should uphold that.Note: We should revisit the decision to require
Field
always being a child of aForm
later since it would make sense to allowBox
within forms as well for positioning. But this requires a validation refactor.