Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #221 from UltCombo/patch-1
Browse files Browse the repository at this point in the history
Remove site key length check
  • Loading branch information
iambrosi committed Feb 26, 2018
2 parents a187773 + e240563 commit 842d3c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion src/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
14 changes: 0 additions & 14 deletions tests/directive_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@ describe('directive: vcRecaptcha', function () {
elementHtml = '<div vc-recaptcha></div>';
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 = '<div vc-recaptcha key="key"></div>';
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 = '<div vc-recaptcha key="key"></div>';
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 () {
Expand Down

0 comments on commit 842d3c3

Please sign in to comment.