code: func (grant *Grant) Validate() error {
  	g := string(*grant)
  	if len(g) > grantMaxLen {
  		return ErrGrantTooLarge
  	}
  	if len(g) < grantMinLen {
  		return ErrGrantTooSmall
  	}
  
  	if grantRegex.MatchString(g) {
  		return nil
  	}
  	return ErrInvalidGrantCharacter
  }
docs: // Validate validates a raw grant. Validation is successfull if the error is nil