check the validity of MAX_PATTERN_BY_PROJECT