Apache commons-validator 不验证 gmail
Apache commons-validator not validating gmail
我在 Build.gralde 中编译了 Apache commons-validator 1.4.1,目的是验证电子邮件。认为这是一种更可靠的电子邮件验证方法。
compile "commons-validator:commons-validator:1.4.1"
当我尝试 运行 这个时,它 returns 是的。虽然这封电子邮件是假的。
EmailValidator.getInstance().isValid("name@gmail");
为什么会这样?
看来这个问题只出现在 1.4.1 版中,我更新到最新的 1.6 版并进行了相应的验证。
http://commons.apache.org/proper/commons-validator/changes-report.html
我在 Build.gralde 中编译了 Apache commons-validator 1.4.1,目的是验证电子邮件。认为这是一种更可靠的电子邮件验证方法。
compile "commons-validator:commons-validator:1.4.1"
当我尝试 运行 这个时,它 returns 是的。虽然这封电子邮件是假的。
EmailValidator.getInstance().isValid("name@gmail");
为什么会这样?
看来这个问题只出现在 1.4.1 版中,我更新到最新的 1.6 版并进行了相应的验证。
http://commons.apache.org/proper/commons-validator/changes-report.html