My requirement is whenever I have error inside a box layout the collapsible box layout should look like this
Can anyone help me with this please.
Discussion posts and replies are publicly visible
By default, this boxLayout will un-collapse and show a similar message. Did you try that? Does it not fit your requirements?
This is the default behavior of a box if there are validation errors in any of the fields in the contents of the box. Just make sure you have a validation or character limit and it should trigger this behavior. Here's an example:
a!boxLayout( label: "Box Layout", contents: { a!textField( label: "Test", characterLimit: 2, value: "abc" ) } )