Include default validation I18n messages (en, zh-CN, zh-TW).
This commit is contained in:
parent
e7ac2bb9ad
commit
7c672bbc92
|
@ -1,3 +1,8 @@
|
|||
0.0.1
|
||||
-----
|
||||
|
||||
- Include default validation I18n messages (en, zh-CN, zh-TW).
|
||||
|
||||
0.1.0
|
||||
-----
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
en:
|
||||
rucaptcha:
|
||||
invalid: "Captcha invalid!"
|
|
@ -0,0 +1,3 @@
|
|||
'zh-CN':
|
||||
rucaptcha:
|
||||
invalid: "驗證碼不正確"
|
|
@ -0,0 +1,3 @@
|
|||
'zh-CN':
|
||||
rucaptcha:
|
||||
invalid: "验证码不正确"
|
|
@ -14,7 +14,7 @@ module RuCaptcha
|
|||
def verify_rucaptcha?(resource = nil)
|
||||
right = params[:_rucaptcha].strip == session[:_rucaptcha]
|
||||
if resource && resource.respond_to?(:errors)
|
||||
resource.errors.add('rucaptcha', 'invalid') unless right
|
||||
resource.errors.add(:base, t('rucaptcha.invalid')) unless right
|
||||
end
|
||||
right
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module RuCaptcha
|
||||
VERSION = '0.1.0'
|
||||
VERSION = '0.1.1'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue