Custom field "required field" styles

I created a simple CustomField composed of a Button and a TextField. The field is wrapped using a CssLayout.
When setting the caption and the field as required and add the custom field a FormLayout all looks good.
The problem is when I try to validate, how can I apply the “required” styles to the field from the CustomField?
I want to make the border red on the field, apply the usual styles. Right now, only the exclamation mark shows near the field with the message.

Here is the source code of my example