egulias/EmailValidator

Why is this email : "phuonghoa.nguyen@113.161.68.89" valid ?

Opened this issue · 1 comments

As i know the RFC 5322 does allow for the domain part to be an IP address if it is enclosed in square brackets, like so : phuonghoa.nguyen@[113.161.68.89] but when i input this email like : phuonghoa.nguyen@113.161.68.89 then it's still valid

And in case : i input this email : phuonghoa.nguyen@[123.255.37.2] then its invalid ? I have take a look to the core of the package and i find the reason is in this case have report a warning like this :

$this->warnings[AddressLiteral::CODE] = new AddressLiteral();

so in this case still invalid (because i have implement NoRFCWarningsValidation rule)