validate static method

bool validate(
  1. String email, [
  2. bool allowTopLevelDomains = false,
  3. bool allowInternational = true
])

Validate the specified email address.

If allowTopLevelDomains is true, then the validator will allow addresses with top-level domains like email@example.

If allowInternational is true, then the validator will use the newer International Email standards for validating the email address.

Implementation

static bool validate(
  String email, [
  bool allowTopLevelDomains = false,
  bool allowInternational = true,
]) {
  return _EmailParser().validate(
    email,
    allowTopLevelDomains,
    allowInternational,
  );
}