Home > widget-integration > FilterValidationHelper > isValidEmail

FilterValidationHelper.isValidEmail() method

Validates if a string is a valid email address.

Uses basic email format validation (local@domain.tld).

Signature:

isValidEmail(email: string): boolean;

Parameters

Parameter

Type

Description

email

string

The email address to validate. Should follow standard email format.

Returns:

boolean

true if the email matches basic email pattern, false otherwise

Example

Validate customer email:

if (this.validationHelper.isValidEmail(customerEmail)) {
  this.sendNotification(customerEmail);
}