{"record":{"id":"130d8fe99bcacd1f","repo":"PanJiaChen/vue-admin-template","slug":"the-password-can-not-be-less-than-6-digits","errorCode":null,"errorMessage":"The password can not be less than 6 digits","messagePattern":"The password can not be less than 6 digits","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/views/login/index.vue","lineNumber":70,"sourceCode":"  </div>\n</template>\n\n<script>\nimport { validUsername } from '@/utils/validate'\n\nexport default {\n  name: 'Login',\n  data() {\n    const validateUsername = (rule, value, callback) => {\n      if (!validUsername(value)) {\n        callback(new Error('Please enter the correct user name'))\n      } else {\n        callback()\n      }\n    }\n    const validatePassword = (rule, value, callback) => {\n      if (value.length < 6) {\n        callback(new Error('The password can not be less than 6 digits'))\n      } else {\n        callback()\n      }\n    }\n    return {\n      loginForm: {\n        username: 'admin',\n        password: '111111'\n      },\n      loginRules: {\n        username: [{ required: true, trigger: 'blur', validator: validateUsername }],\n        password: [{ required: true, trigger: 'blur', validator: validatePassword }]\n      },\n      loading: false,\n      passwordType: 'password',\n      redirect: undefined\n    }\n  },","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/PanJiaChen/vue-admin-template/blob/4c18a3f47bdb417ad8a25f09910f848cb574dee2/src/views/login/index.vue#L52-L88","documentation":"Login form validation error raised by the password rule: fires when the password field has fewer than 6 characters, enforcing a minimum length before the login request is sent.","triggerScenarios":"Thrown at src/views/login/index.vue:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter a password of at least 6 characters","Treat the min-length rule as a UX guard only; real password policy must be enforced server-side","Adjust the length threshold in validatePassword if the backend policy differs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c18a3f47bdb417ad8a25f09910f848cb574dee2","analyzedAt":"2026-09-02T02:49:53.558Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}