diff --git a/src/service.js b/src/service.js index 96624e7..c7933da 100644 --- a/src/service.js +++ b/src/service.js @@ -178,7 +178,7 @@ conf.hl = conf.lang || config.lang; conf.badge = conf.badge || config.badge; - if (!conf.sitekey || conf.sitekey.length !== 40) { + if (!conf.sitekey) { throwNoKeyException(); } return getRecaptcha().then(function (recaptcha) { diff --git a/tests/directive_test.js b/tests/directive_test.js index accc812..67e127b 100644 --- a/tests/directive_test.js +++ b/tests/directive_test.js @@ -36,20 +36,6 @@ describe('directive: vcRecaptcha', function () { elementHtml = '
'; expectedMessage = 'You need to set the "key" attribute to your public reCaptcha key. If you don\'t have a key, please get one from https://www.google.com/recaptcha/admin/create'; }); - - it('should throw an error - key length is not 40 caracters long', function () { - elementHtml = '
'; - expectedMessage = 'You need to set the "key" attribute to your public reCaptcha key. If you don\'t have a key, please get one from https://www.google.com/recaptcha/admin/create'; - - $scope.key = 'abc'; - }); - - it('should throw an error - key length is not 40 caracters long - key changed', function () { - elementHtml = '
'; - expectedMessage = 'You need to set the "key" attribute to your public reCaptcha key. If you don\'t have a key, please get one from https://www.google.com/recaptcha/admin/create'; - - $scope.key = 'abc1'; - }); }); describe('widgetId', function () {