code: func (domain *TypedDataDomain) validate() error {
  	if domain.ChainId == big.NewInt(0) {
  		return errors.New("chainId must be specified according to EIP-155")
  	}
  
  	if len(domain.Name) == 0 && len(domain.Version) == 0 && len(domain.VerifyingContract) == 0 && len(domain.Salt) == 0 {
  		return errors.New("domain is undefined")
  	}
  
  	return nil
  }
docs: // validate checks if the given domain is valid, i.e. contains at least
  // the minimum viable keys and values