While working on this ticket I found a logic error in the test. I expected both default_value and value_expression. It turns out the default_value is always there, it's just null if we don't set it.
Modified the existing test for hidden and required, and added tests to make sure my passing logic is now correct.
We test 2 things.
- If a field can be hidden and required, it must have a default value or value_expression
- If a field is hidden and required, make sure we use the default value