How to check if an account address user typed is valid

Hi,

I am working on an application which allows user to send Algo to other accounts. My question is, when they typed the account address to send, before I do the real transaction, is there a way to check if the public address user input is valid?

For example, if user typed “7IUL2DDQRP5GGRTJBI3TYB7YSC4E4AUQFX2JKCAJL7R45OPD64QTSKMIQE”, that’s a valid algorand address, if typed “ABC1234455…”, that’s not a valid Algorand address.

Seems I can call the /v2/accounts/{address} API which will return 400 if the address is invalid, but I am wondering is there another way that I can verify that address locally?

Thank you in advance.

hmm, I think I found such function:

In Python’s SDK:

And in Golang:

And in Dart:
https://pub.dev/documentation/algorand_dart/latest/algorand_dart/Address/isAlgorandAddress.html

So other languages’ SDK should have a similar function.