Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library.guid.isvalid

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-core-library > Guid > isValid

Guid.isValid() method

Indicates whether a GUID is valid, i.e. whether it would be successfully parsed by Guid.tryParse(). This function is cheaper than Guid.tryParse() because it does not construct a Guid object.

Signature:

static isValid(guid: string | undefined | null): boolean;

Parameters

Parameter Type Description
guid string | undefined | null The input string.

Returns:

boolean

true, if the Guid is valid.

Clone this wiki locally