code: func (l PermalinkExpander) validate(pp string) bool {
  	fragments := strings.Split(pp[1:], "/")
  	var bail = false
  	for i := range fragments {
  		if bail {
  			return false
  		}
  		if len(fragments[i]) == 0 {
  			bail = true
  			continue
  		}
  
  		matches := attributeRegexp.FindAllStringSubmatch(fragments[i], -1)
  		if matches == nil {
  			continue
  		}
  
  		for _, match := range matches {
  			k := strings.ToLower(match[0][1:])
  			if _, ok := l.knownPermalinkAttributes[k]; !ok {
  				return false
  			}
  		}
  	}
  	return true
  }
docs: // validate determines if a PathPattern is well-formed