validator
validator copied to clipboard
Options for Email is set but not used
Hello,
We are speaking about the email rules.
You say that we can use any options available in validator.js but in the code, options returned are filtered.
return {
compiledOptions: {
domain_specific_validation: options.domainSpecificValidation,
allow_ip_domain: options.allowIpDomain,
ignore_max_length: options.ignoreMaxLength,
sanitize: sanitizationOptions,
},
};
So it's impossible to use an option list host_blacklist !
And here is the type
/**
* Options to validate email
*/
export type EmailValidationOptions = {
allowDisplayName?: boolean;
requireDisplayName?: boolean;
allowUtf8LocalPart?: boolean;
requireTld?: boolean;
ignoreMaxLength?: boolean;
allowIpDomain?: boolean;
domainSpecificValidation?: boolean;
hostBlacklist?: string[];
};