#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum ValidationError {
#[error("the domain name is empty. Give a name such as \"example.com\"")]
EmptyDomain,
#[error("\"{value}\" is not a domain name: {problem}")]
InvalidDomain {
value: String,
problem: &'static str,
},
#[error("\"{value}\" is not an email address: {problem}")]
InvalidEmail {
value: String,
problem: &'static str,
},
#[error(
"\"{value}\" is the address a source returns when it has no contact for the \
network, not a contact. Ask the regional registry, or use the technical \
contact from RDAP"
)]
WithheldEmail {
value: String,
},
#[error(
"\"{value}\" is a placeholder the registry sends in place of an address, \
not an address. Look for the abuse contact of the network instead"
)]
RedactedEmail {
value: String,
},
}