Avoid extra preg_match() call when $cleanupBeforeValidate is false