Is there a way to limit the max distance of bones?

I want to implement cloth physics using bones but I have encountered a problem.

The bone chains that drive the cloth can get separated from each other because they are not linked to each other in any way. This causes the cloth to clip through the leg.

Is there a way to limit the distance of a member of the bone chains in relation to another bone chain member so they do not travel too far apart from each other?