Minor code reformatting in substring validator