我们的客户使用TYPO3 6.2.14并使用formhandler
(2.0.1)构建了一个公式。现在我们必须添加验证码以防止垃圾邮件发布。所以我按照文档中的建议安装了captcha
(1.3.0)并添加了下面的typoscript行(仅限验证部分):
plugin.Tx_Formhandler.settings.predef.contact_test {
# ...
validators{
# default validator
1 {
class = Validator_Default
config {
disableErrorCheckFields = captchafield
fieldConf {
salutation.errorCheck.1 = required
firstname.errorCheck.1 = required
lastname.errorCheck.1 = required
email.errorCheck.1 = required
email.errorCheck.2 = email
subject.errorCheck.1 = required
message.errorCheck.1 = required
}
}
}
# captcha validate
2 {
class = Tx_Formhandler_Validator_Default
config {
disableErrorCheckFields = salutation,firstname,lastname,email,subject,message
fieldConf {
captchafield.errorCheck.1 = captcha
}
}
}
}
# ...
}
必填字段仍然像以前一样工作,如果验证码错误,验证码字段也会对未填充状态作出反应并提交提交。但为什么它没有显示“你输入的验证码不匹配”这样的错误?