['required', 'string'], 'password' => [ 'required', 'string', 'min:8', 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^A-Za-z0-9]).{8,}$/', ], 'device_name' => ['nullable', 'string'], ]; } public function messages(): array { return [ 'password.min' => 'Password minimal 8 karakter.', 'password.regex' => 'Password harus mengandung huruf besar, huruf kecil, angka, dan simbol khusus.', ]; } }