# Validate cosmos address in solidity?

**URL:** <https://forum.cosmos.network/t/validate-cosmos-address-in-solidity/4887>\
**Category:** Ethermint\
**Created:** [May 29, 2021, 12:58pm UTC](https://forum.cosmos.network/t/validate-cosmos-address-in-solidity/4887 "2021-05-29T12:58:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kombos](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/kombos/32/1539_2.png) [@kombos](https://forum.cosmos.network/u/kombos)\
**Post date:** [May 29, 2021, 12:58pm UTC](https://forum.cosmos.network/t/validate-cosmos-address-in-solidity/4887/1 "2021-05-29T12:58:59Z")

</div>

i want to validate a cosmos address in solidity which should return true or false for valid or invalid respectively. I believe this would involve doing bech32 validation with the following checks:

1. check if hrp is valid (“cosmos”)
2. check if the subsequent character is “1”
3. check the checksum validity

would these steps suffice or should there be more validations? also any source of contract logic for these checks (especially the third).

---

<div class="post-metadata">

**Author:** ![catdotfish](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/catdotfish/32/7847_2.png) [@catdotfish](https://forum.cosmos.network/u/catdotfish)\
**Post date:** [May 29, 2021, 5:41pm UTC](https://forum.cosmos.network/t/validate-cosmos-address-in-solidity/4887/2 "2021-05-29T17:41:01Z")

</div>

Hihi 🐾  
Technical support by Core Devs is provided within the cosmos Discord Server.  
Please use [this link](https://discord.gg/vcExX9T) to join the community and post your question in the #general-dev channel.
