apache commons验证程序未验证gmail

bxfogqkk  于 2021-07-03  发布在  Java
关注(0)|答案(1)|浏览(362)

我在build.gralde中编译了apache commons validator 1.4.1,目的是验证电子邮件。认为这是一种更可靠的电子邮件验证方法。

compile "commons-validator:commons-validator:1.4.1"

当我试着运行它时,它返回真的。而这封邮件是假的。

EmailValidator.getInstance().isValid("name@gmail");

为什么会这样?

rseugnpd

rseugnpd1#

似乎这个问题只适用于1.4.1版本,我更新到了最新的1.6版本,验证也相应地工作。
http://commons.apache.org/proper/commons-validator/changes-report.html

相关问题