code: func (ch Challenge) RecordsSane() bool {
  	if ch.ValidationRecord == nil || len(ch.ValidationRecord) == 0 {
  		return false
  	}
  
  	switch ch.Type {
  	case ChallengeTypeHTTP01:
  		for _, rec := range ch.ValidationRecord {
  			if rec.URL == "" || rec.Hostname == "" || rec.Port == "" || rec.AddressUsed == nil ||
  				len(rec.AddressesResolved) == 0 {
  				return false
  			}
  		}
  	case ChallengeTypeTLSALPN01:
  		if len(ch.ValidationRecord) > 1 {
  			return false
  		}
  		if ch.ValidationRecord[0].URL != "" {
  			return false
  		}
  		if ch.ValidationRecord[0].Hostname == "" || ch.ValidationRecord[0].Port == "" ||
  			ch.ValidationRecord[0].AddressUsed == nil || len(ch.ValidationRecord[0].AddressesResolved) == 0 {
  			return false
  		}
  	case ChallengeTypeDNS01:
  		if len(ch.ValidationRecord) > 1 {
  			return false
  		}
  		if ch.ValidationRecord[0].Hostname == "" {
  			return false
  		}
  		return true
  	default: // Unsupported challenge type
  		return false
  	}
  
  	return true
  }
docs: // RecordsSane checks the sanity of a ValidationRecord object before sending it
  // back to the RA to be stored.