From 9e38c63614e77f98cb527896d9054b9b6d3c9fc8 Mon Sep 17 00:00:00 2001 From: shahrzad011 Date: Sat, 22 Aug 2026 11:27:09 +0330 Subject: [PATCH] feat: add user password update validation --- .../Requests/UserPasswordUpdateRequest.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 app/Http/Requests/UserPasswordUpdateRequest.php diff --git a/app/Http/Requests/UserPasswordUpdateRequest.php b/app/Http/Requests/UserPasswordUpdateRequest.php new file mode 100644 index 0000000..dd05d87 --- /dev/null +++ b/app/Http/Requests/UserPasswordUpdateRequest.php @@ -0,0 +1,41 @@ +|string> + */ + public function rules(): array + { + return [ + // چک کردن رمز فعلی کاربر + 'current_password' => + [ + 'nullable', + 'current_password' + ], + 'password' => + [ + 'required', + 'string', + 'min:8', + 'confirmed' + ], + ]; + } +}