{"record":{"id":"a023297a3b95b917","repo":"octobercms/october","slug":"password-must-contain-at-least-one-number","errorCode":null,"errorMessage":"Password must contain at least one number.","messagePattern":"Password must contain at least one number\\.","errorType":"validation","errorClass":"ValidationException","httpStatus":422,"severity":"error","filePath":"modules/backend/models/User.php","lineNumber":375,"sourceCode":"                throw new ValidationException(['password' => __('Password must have a minimum of length of :min characters', ['min'=>$minLength])]);\n            }\n        }\n\n        if ($policy['require_uppercase'] ?? false) {\n            if (mb_strtolower($password) === $password) {\n                throw new ValidationException(['password' => __('Password must contain at least one uppercase character.')]);\n            }\n        }\n\n        if ($policy['require_lowercase'] ?? false) {\n            if (mb_strtoupper($password) === $password) {\n                throw new ValidationException(['password' => __('Password must contain at least one lowercase character.')]);\n            }\n        }\n\n        if ($policy['require_number'] ?? false) {\n            if (!array_filter(str_split($password), 'is_numeric')) {\n                throw new ValidationException(['password' => __('Password must contain at least one number.')]);\n            }\n        }\n\n        if ($policy['require_nonalpha'] ?? false) {\n            if (!Str::contains($password, str_split(\"!@#$%^&*()_+-=[]{}|'\"))) {\n                throw new ValidationException(['password' => __('Password must contain at least one nonalphanumeric character.')]);\n            }\n        }\n\n        /**\n         * @event user.validatePasswordPolicy\n         * Called when the user password is validated against the policy\n         *\n         * Example usage:\n         *\n         *     $model->bindEvent('user.validatePasswordPolicy', function (string $password) use ($model) {\n         *         throw new ValidationException(['password' => 'Prevent anything from validating ever!']);\n         *     });","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/models/User.php#L357-L393","documentation":"Error \"Password must contain at least one number.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/models/User.php:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}