substantial-compliance rule — Legal Definition, Examples & Cases