func (p *Profile) Validate() error {
	if strings.TrimSpace(p.DTag) == "" || p.DTag == DoNotModify {
		return fmt.Errorf("invalid profile DTag: %s", p.DTag)
	}
	if p.Nickname == DoNotModify {
		return fmt.Errorf("invalid profile nickname: %s", p.Nickname)
	}
	if p.Bio == DoNotModify {
		return fmt.Errorf("invalid profile bio: %s", p.Bio)
	}
	if p.Pictures.Profile == DoNotModify {
		return fmt.Errorf("invalid profile picture: %s", p.Pictures.Profile)
	}
	if p.Pictures.Cover == DoNotModify {
		return fmt.Errorf("invalid profile cover: %s", p.Pictures.Cover)
	}
	if len(p.GetAddress()) == 0 {
		return fmt.Errorf("invalid address: %s", p.GetAddress().String())
	}
	return p.Pictures.Validate()
}
Validate check the validity of the Profile
package types
import (
	"encoding/json"
	"fmt"
	"strings"
	"time"
	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
	"github.com/ghodss/yaml"
	"github.com/gogo/protobuf/proto"
)
var (
	_ authtypes.AccountI = (*Profile)(nil)
)
func NewProfile(
	dTag string, nickname, bio string, pictures Pictures, creationDate time.Time,
	account authtypes.AccountI,
) (*Profile, error) {
	protoAccount, ok := account.(proto.Message)
	if !ok {
		return nil, fmt.Errorf("the given account cannot be serialized using Protobuf")
	}
	myAccountAny, err := codectypes.NewAnyWithValue(protoAccount)
	if err != nil {
		return nil, err
	}
	return &Profile{
		DTag:         dTag,
		Nickname:     nickname,
		Bio:          bio,
		Pictures:     pictures,
		CreationDate: creationDate,
		Account:      myAccountAny,
	}, nil
}
func NewProfileFromAccount(dTag string, account authtypes.AccountI, creationTime time.Time) (*Profile, error) {
	return NewProfile(
		dTag,
		"",
		"",
		NewPictures("", ""),
		creationTime,
		account,
	)
}
func (p *Profile) GetAccount() authtypes.AccountI {
	return p.Account.GetCachedValue().(authtypes.AccountI)
}
func (p *Profile) setAccount(account authtypes.AccountI) error {
	accAny, err := codectypes.NewAnyWithValue(account)
	if err != nil {
		return err
	}
	p.Account = accAny
	return nil
}
func (p *Profile) GetAddress() sdk.AccAddress {
	return p.GetAccount().GetAddress()
}
func (p *Profile) SetAddress(addr sdk.AccAddress) error {
	acc := p.GetAccount()
	err := acc.SetAddress(addr)
	if err != nil {
		return err
	}
	return p.setAccount(acc)
}
func (p *Profile) GetPubKey() cryptotypes.PubKey {
	return p.GetAccount().GetPubKey()
}
func (p *Profile) SetPubKey(pubKey cryptotypes.PubKey) error {
	acc := p.GetAccount()
	err := acc.SetPubKey(pubKey)
	if err != nil {
		return err
	}
	return p.setAccount(acc)
}
func (p *Profile) GetAccountNumber() uint64 {
	return p.GetAccount().GetAccountNumber()
}
func (p *Profile) SetAccountNumber(accountNumber uint64) error {
	acc := p.GetAccount()
	err := acc.SetAccountNumber(accountNumber)
	if err != nil {
		return err
	}
	return p.setAccount(acc)
}
func (p *Profile) GetSequence() uint64 {
	return p.GetAccount().GetSequence()
}
func (p *Profile) SetSequence(sequence uint64) error {
	acc := p.GetAccount()
	err := acc.SetSequence(sequence)
	if err != nil {
		return err
	}
	return p.setAccount(acc)
}
func (p *Profile) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {
	if p.Account != nil {
		var account authtypes.AccountI
		err := unpacker.UnpackAny(p.Account, &account)
		if err != nil {
			return err
		}
	}
	return nil
}