fix code validating format rules