API ReferenceValidationFunction
validateAddress()
function validateAddress(raw): Result<`0x${string}`, ValidationError[]>;Validates an Ethereum address string.
Pure tier-1 validator — no deps, no config, no promises. Safe to call from form onChange handlers
and server-side code alike.
Returns Result.ok with the checksummed address on success, or Result.err with a
ValidationError array on failure.
Accepts lowercase, uppercase, or correctly checksummed mixed-case input; a mixed-case address with a wrong EIP-55 checksum is rejected. Does not resolve ENS names — see isPossiblyAnENSName and resolveAddress.
Parameters
| Parameter | Type |
|---|---|
raw | string |
Returns
Result<`0x${string}`,
ValidationError[]>