在不创建用户帐户的情况下验证Meteor中的电子邮件地址

时间:2021-09-29 16:41:00

I'm creating a website in Meteor where users can sign up to get notifications using their email address. I want to be able to verify the addresses that are entered, but users do not need to create an account. Is there a way to use the email verification tool built into Meteor without actually using accounts-password, or will I need to somehow create an email verification script from scratch?

我正在Meteor中创建一个网站,用户可以使用他们的电子邮件地址注册以获取通知。我希望能够验证输入的地址,但用户不需要创建帐户。有没有办法在没有实际使用帐户密码的情况下使用Meteor内置的电子邮件验证工具,或者我是否需要以某种方式从头开始创建电子邮件验证脚本?

1 个解决方案

#1


0  

I was looking for the same functionality some time back but could not find it so I ended up creating my email validaion functions using collection-2/simple-schema on the server side and jqueryValidation plugin client side (in the end I ended up removing jqueryValidation plugin function as it was compromising my security).

我一段时间以来一直在寻找相同的功能但是找不到它所以我最终使用服务器端的collection-2 / simple-schema和jqueryValidation插件客户端创建了我的电子邮件验证函数(最后我最终删除了jqueryValidation插件功能因为它损害了我的安全性)。

The functions validate the existence of the email address in my users collection and not the existence of the email address on some domain on the web - I believe this is the functionality you are looking for as that is what meteor does out of the box. Both simple-schema and jqueryValidation plugin do the regex email validation easily - just see their documentation.

这些函数验证了我的用户集合中是否存在电子邮件地址,而不是网络上某些域中存在的电子邮件地址 - 我相信这是您正在寻找的功能,因为这就是流星开箱即用的功能。 simple-schema和jqueryValidation插件都可以轻松地进行正则表达式电子邮件验证 - 只需查看其文档即可。

That said, if you however do find that meteor out of the box validation most of us would like to know about it, so please do post it back.

也就是说,如果您确实发现了开箱即用的流星验证,我们大多数人都想了解它,所以请将其发回。

#1


0  

I was looking for the same functionality some time back but could not find it so I ended up creating my email validaion functions using collection-2/simple-schema on the server side and jqueryValidation plugin client side (in the end I ended up removing jqueryValidation plugin function as it was compromising my security).

我一段时间以来一直在寻找相同的功能但是找不到它所以我最终使用服务器端的collection-2 / simple-schema和jqueryValidation插件客户端创建了我的电子邮件验证函数(最后我最终删除了jqueryValidation插件功能因为它损害了我的安全性)。

The functions validate the existence of the email address in my users collection and not the existence of the email address on some domain on the web - I believe this is the functionality you are looking for as that is what meteor does out of the box. Both simple-schema and jqueryValidation plugin do the regex email validation easily - just see their documentation.

这些函数验证了我的用户集合中是否存在电子邮件地址,而不是网络上某些域中存在的电子邮件地址 - 我相信这是您正在寻找的功能,因为这就是流星开箱即用的功能。 simple-schema和jqueryValidation插件都可以轻松地进行正则表达式电子邮件验证 - 只需查看其文档即可。

That said, if you however do find that meteor out of the box validation most of us would like to know about it, so please do post it back.

也就是说,如果您确实发现了开箱即用的流星验证,我们大多数人都想了解它,所以请将其发回。