Tag: captcha

通过使用hapi.js槽在nodeJS中联系表单Joivalidation器:captcha强制的?

我正在使用Hapi.js框架在nodeJS中构build一个联系表单。 我使用Joivalidation器来validation来自服务器端用户的input。 我怀疑是否应该使用captcha来防止垃圾邮件。 Joi可能够了吗?

Express和Jade,传入variables

我试图安装这个captcha插件,这是我迄今为止(直接从他们的代码,只是对我的风格调整) 这里是validation码和我下面的步骤: https://github.com/mirhampt/node-recaptcha : https://github.com/mirhampt/node-recaptcha 在我的router.js文件中: app.get('/account/verification/:token/', require('./views/account/verification/index').verifyHuman); 在我的/views/account/verification/index.js文件中: exports.verifyHuman = function(req, res, next){ var Recaptcha = require('recaptcha').Recaptcha; var recaptchaKeys = req.app.config.recaptchaKeys; var recaptcha = new Recaptcha(recaptchaKeys.publicKey, recaptchaKeys.privateKey); console.log(recaptcha.toHTML()); //this returns a script tag with an iframe and stuff in it res.render('account/verification/captcha', { layout: false, locals: { recaptcha_form: recaptcha.toHTML() } }); }; 然后我的/views/account/verification/captcha.jade文件: div#captcha script(type='text/template', […]