Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
build(Validator): Upgrade siriusphp/validation to 2.3
Browse files Browse the repository at this point in the history
with new build-in validation rule (siriusphp/validation#61), We can easily check if The password matches username.
  • Loading branch information
Rhilip committed Aug 12, 2019
1 parent b744e81 commit eb039eb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Feat
- **Auth:** Use JWT to set cookies content (bf897c6)
- **Auth/Login:** Add full Advanced Options support (6009dc8)
- **Secret:** Check session and user_id match or not in jwt payload (358ba5d)
- **Secret:** Protect jwt key for env('APP_SECRET_KEY') (dfa67da)
- **ban_ips:** Store banned ip in components/Site (01084c9)

Expand Down
3 changes: 2 additions & 1 deletion apps/models/form/Auth/UserRegisterForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ public static function inputRules()
['required'],
['MaxLength', ['max' => 12], 'User name is too log, Max length {max}']
],
'password' => [ // TODO The password cannot match your username. ( make change to validator library
'password' => [
['required'],
['length', '6,40'],
['NotMatch', ['item' => 'username']]
],
'password_again' => [
['required'],
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"league/plates": "^3.3",
"mjohnson/decoda": "^6.12",
"phpmailer/phpmailer": "^6.0",
"siriusphp/validation": "^2.2",
"siriusphp/validation": "^2.3",
"soundasleep/html2text": "^1.1",
"robthree/twofactorauth": "^1.6",
"firebase/php-jwt": "^5.0"
Expand Down
38 changes: 19 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit eb039eb

Please sign in to comment.