Skip to content

Commit

Permalink
refactor(setting): update Setting.php
Browse files Browse the repository at this point in the history
- Add validation rules for boolean values
- Update the saving method
  • Loading branch information
guanguans committed Oct 20, 2023
1 parent d1004e9 commit 649c8f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function form(): void
})
->saving(function (int $value): bool {
return (bool) $value;
});
})
->rules('required|boolean');

$this->text('length', $this->trans('login-captcha.length'))
->required()
Expand Down

0 comments on commit 649c8f7

Please sign in to comment.