Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created November 20, 2019 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/65dd57693b6cd4d7a0503171750f8d66 to your computer and use it in GitHub Desktop.
Save miguelmota/65dd57693b6cd4d7a0503171750f8d66 to your computer and use it in GitHub Desktop.
JavaScript validate ethereum public address
const validAddress = (address) => {
return /^(0x)[0-9a-f]{40}$/i.test(address)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment