isValidENSName

Checks if a string is a valid ENS name. It does not check if the ENS name is currently registered or resolves to an address - it only validates the string format.

Example

isValidENSName("thirdweb.eth"); // true
isValidENSName("foo.bar.com"); // true
isValidENSName("xyz"); // false
function isValidENSName(name: string): boolean;

Parameters

The ENS name to check.

Type

let name: string;

Returns

let returnType: boolean;