SingleValidationResponse class

Response from a single email validation request.

Contains comprehensive validation results including syntax validation, domain verification, MX record checks, SMTP validation, disposable email detection, risk assessment, and deliverability information.

Example:

final result = await client.validateEmail('user@example.com');
print('Email: ${result.email}');
print('Valid: ${result.isValid}');
print('Score: ${result.score}/100');
print('Risk: ${result.risk}');
print('Provider: ${result.provider}');

Constructors

SingleValidationResponse({required String email, required bool isValid, required int score, required bool deliverable, required bool syntaxValid, required bool domainValid, required bool mxRecords, required bool smtpValid, bool? catchAll, required bool disposable, required bool generic, String? provider, required String risk, String? confidence, String? suggestion, int? creditsRemaining, bool? cached, String? timestamp})
Creates a new SingleValidationResponse.
const
SingleValidationResponse.fromJson(Map<String, dynamic> json)
Creates a SingleValidationResponse from a JSON map.
factory

Properties

cached bool?
Whether this result was retrieved from cache.
final
catchAll bool?
Whether the domain uses catch-all email addresses.
final
confidence String?
Confidence level: 'High', 'Medium', or 'Low'.
final
creditsRemaining int?
Remaining credits in your account after this validation.
final
deliverable bool
Whether the email is deliverable (can receive emails).
final
disposable bool
Whether the email is from a disposable/temporary email service.
final
domainValid bool
Whether the domain exists and is valid.
final
email String
The email address that was validated (normalized to lowercase).
final
generic bool
Whether the email is a role-based or generic address.
final
hashCode int
The hash code for this object.
no setterinherited
isValid bool
Whether the email is valid and deliverable.
final
mxRecords bool
Whether the domain has MX (Mail Exchange) records configured.
final
provider String?
The email provider name, if recognized.
final
risk String
Risk level assessment: 'LOW', 'MEDIUM', or 'HIGH'.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
score int
Validation score from 0 to 100.
final
smtpValid bool
Whether SMTP verification was successful.
final
suggestion String?
Suggested correction if a typo was detected.
final
syntaxValid bool
Whether the email syntax is valid according to RFC standards.
final
timestamp String?
ISO 8601 timestamp of when the validation was performed.
final

Methods

getMockingMessage() String?
Gets a random mocking message if this email is from a disposable/temporary service.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited