{"record":{"id":"a29bb224147f2314","repo":"PanJiaChen/vue-admin-template","slug":"please-enter-the-correct-user-name","errorCode":null,"errorMessage":"Please enter the correct user name","messagePattern":"Please enter the correct user name","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/views/login/index.vue","lineNumber":63,"sourceCode":"\n      <div class=\"tips\">\n        <span style=\"margin-right:20px;\">username: admin</span>\n        <span> password: any</span>\n      </div>\n\n    </el-form>\n  </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 }],","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/PanJiaChen/vue-admin-template/blob/4c18a3f47bdb417ad8a25f09910f848cb574dee2/src/views/login/index.vue#L45-L81","documentation":"Login form validation error raised by the async-validator username rule: fires when the entered username fails the validUsername helper (anything other than the whitelisted 'admin' account), blocking form submission until a valid username is entered.","triggerScenarios":"Thrown at src/views/login/index.vue:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter a whitelisted username (admin in this template)","Extend the whitelist in src/utils/validate.js if additional accounts should be accepted","Replace validUsername with real server-side authentication for production use"],"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"}