I have a line like this:
bpy.types.Scene.myobject_name = bpy.props.StringProperty(name="Name", maxlen=64, description="Object name")
In the UI I display the prop with these lines:
box = layout.box()
row = box.row(align=True)
row.prop(scene, 'myobject_name', text="Name")
Is possible to change the property color to red as Blender does in Modifier tab when something is wrong?