From 1d392518d2d3e7def43c026c989bc986333e401c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 20:41:16 +0000 Subject: [PATCH 1/3] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/fix-php-code-style-issues.yml | 2 +- .github/workflows/phpstan.yml | 2 +- .github/workflows/run-tests.yml | 2 +- .github/workflows/update-changelog.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index 3232a77..2c9401b 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index a764525..25dff28 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -11,7 +11,7 @@ jobs: name: phpstan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 856736c..14f4b7f 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 8c12ba9..a817f81 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: main From ca61477ba473365b0d8791dc87e972c98ae66e57 Mon Sep 17 00:00:00 2001 From: Mohammad Hafijul Islam Date: Sun, 1 Oct 2023 14:27:19 +0600 Subject: [PATCH 2/3] LP-2 fix: registration validation moved to auth config --- config/auth.php | 44 +++++++++++++++++++++++ src/Http/Requests/RegistrationRequest.php | 4 +-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/config/auth.php b/config/auth.php index d78df2c..96e837c 100644 --- a/config/auth.php +++ b/config/auth.php @@ -72,6 +72,50 @@ 'login_id' => ['required', 'string'], 'password' => ['required', 'string', \Illuminate\Validation\Rules\Password::default()], ], + 'register' => [ + //user + 'name' => ['required', 'string', 'min:2', 'max:255'], + 'mobile' => ['required', 'string', 'min:10'], + 'email' => ['required', 'string', 'email:rfc,dns', 'min:2', 'max:255'], + 'login_id' => ['required', 'string', 'min:6', 'max:255'], + 'password' => ['required', 'string', \Illuminate\Validation\Rules\Password::default()], + 'pin' => ['required', 'string', 'min:4', 'max:16'], + 'parent_id' => ['nullable', 'integer'], + 'app_version' => ['nullable', 'string'], + 'fcm_token' => ['nullable', 'string'], + 'language' => ['nullable', 'string'], + 'currency' => ['nullable', 'string'], + + //profile + 'father_name' => ['string', 'nullable'], + 'mother_name' => ['string', 'nullable'], + 'gender' => ['string', 'nullable'], + 'marital_status' => ['string', 'nullable'], + 'occupation' => ['string', 'nullable'], + 'source_of_income' => ['string', 'nullable'], + 'id_type' => ['string', 'nullable'], + 'id_no' => ['string', 'nullable'], + 'id_issue_country' => ['string', 'nullable'], + 'id_expired_at' => ['string', 'nullable'], + 'id_issue_at' => ['string', 'nullable'], + 'profile_photo' => [\Illuminate\Validation\Rules\File::image(), 'nullable'], + 'scan' => [\Illuminate\Validation\Rules\File::types(['application/pdf', 'image/*']), 'nullable'], + 'scan_1' => [\Illuminate\Validation\Rules\File::types(['application/pdf', 'image/*']), 'nullable'], + 'scan_2' => [\Illuminate\Validation\Rules\File::types(['application/pdf', 'image/*']), 'nullable'], + 'date_of_birth' => ['date', 'nullable'], + 'permanent_address' => ['string', 'nullable'], + 'city_id' => ['integer', 'nullable'], + 'state_id' => ['integer', 'nullable'], + 'country_id' => ['integer', 'nullable'], + 'post_code' => ['string', 'nullable'], + 'present_address' => ['string', 'nullable'], + 'present_city_id' => ['integer', 'nullable'], + 'present_state_id' => ['integer', 'nullable'], + 'present_country_id' => ['integer', 'nullable'], + 'present_post_code' => ['string', 'nullable'], + 'note' => ['string', 'nullable'], + 'nationality' => ['string', 'nullable'], + ] ], /* diff --git a/src/Http/Requests/RegistrationRequest.php b/src/Http/Requests/RegistrationRequest.php index c38ca8e..81b4366 100644 --- a/src/Http/Requests/RegistrationRequest.php +++ b/src/Http/Requests/RegistrationRequest.php @@ -23,7 +23,7 @@ public function authorize(): bool */ public function rules(): array { - return [ + return config('fintech.auth.validation.register', [ //user 'name' => ['required', 'string', 'min:2', 'max:255'], 'mobile' => ['required', 'string', 'min:10'], @@ -66,6 +66,6 @@ public function rules(): array 'present_post_code' => ['string', 'nullable'], 'note' => ['string', 'nullable'], 'nationality' => ['string', 'nullable'], - ]; + ]); } } From 65e1e5e68ab0fa668868caacd56943bda4612b36 Mon Sep 17 00:00:00 2001 From: hafijul233 Date: Sun, 1 Oct 2023 08:28:10 +0000 Subject: [PATCH 3/3] Fix styling --- config/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/auth.php b/config/auth.php index 96e837c..08c3b39 100644 --- a/config/auth.php +++ b/config/auth.php @@ -115,7 +115,7 @@ 'present_post_code' => ['string', 'nullable'], 'note' => ['string', 'nullable'], 'nationality' => ['string', 'nullable'], - ] + ], ], /*