Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix function isValid() #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix function isValid() #1

wants to merge 1 commit into from

Conversation

Airkro
Copy link

@Airkro Airkro commented Oct 15, 2024

修复当身份证包含 X/x 时未正确处理的问题

问题描述:

当身份证号包含X/x时,isValid = false,是由于 toLowerCaseX 不匹配引起的:

id = id.toLowerCase();

let lastLetter = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];

修复当身份证包含 X/x 时未正确处理的问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant