Skip to content

@technobuddha > library > RegExp > Validation

Function: isEmail()

ts
function isEmail(value: string): boolean;

Defined in: is-email.ts:17

Determines whether a given string is a valid email address.

Parameters

ParameterTypeDescription
valuestringThe string to test for email format.

Returns

boolean

true if the string is a valid email address, otherwise false.

Example

typescript
isEmail("user@example.com"); // true
isEmail("invalid-email"); // false