Skip to content

Commit

Permalink
Allow nette/forms v3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jankonas authored and f3l1x committed Feb 6, 2021
1 parent 82417c2 commit aaafd81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"require": {
"php": ">=7.2",
"contributte/di": "^0.5.1",
"nette/forms": "~3.0.0",
"nette/forms": "^3.0.0",
"nette/utils": "^3.0.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/ReCaptchaField.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ private function configureValidation(): void
return;
}

$this->configured = true;
$message = $this->message ?? 'Are you a bot?';
$this->addRule(function ($code): bool {
return $this->verify() === true;
}, $message);
$this->configured = true;
}

public function verify(): bool
Expand Down

0 comments on commit aaafd81

Please sign in to comment.