jxlwqq / id-validator Goto Github PK
View Code? Open in Web Editor NEW中华人民共和国居民身份证、中华人民共和国港澳居民居住证以及中华人民共和国**居民居住证号码验证工具(PHP 版)
License: MIT License
中华人民共和国居民身份证、中华人民共和国港澳居民居住证以及中华人民共和国**居民居住证号码验证工具(PHP 版)
License: MIT License
通过 composer 安装,data
文件夹压根儿就没装。
Nov 25 2021 GA
composer require "jxlwqq/id-validator"
报错
Could not find package jxlwqq/id-validator. It was however found via repository search, which indicates a consistency issue with the repository.
阿里云 laravel 官方源 都是试过了
生肖一般是根据农历计算的,库里是按照阳历计算的
632826201612050015 该身份证号真实有效 但该组件校验不通过
632824、632825、632826开头的身份证校验都不行
RT
身份证开头 441282 ,确认了身份证的正确性,走公安接口可以通过,但是在行政区划的文件里找不到,我到民政部网站里去翻也找不到。现在很尴尬,不知道如何处理,又不希望自己手动改 vendor 的源码造成后续维护困难。可以发布一个类似于配置文件的内容,将这些特殊的行政区划加入到验证中么?
97年之前的都显示错误
这个开头的身份证,一直提示校验错误,查了一下相关报道,知道是历史遗留问题,是有效的,不知道程序上能不能兼容一下。
http://news.cctv.com/society/20070824/100579.shtml 央视新闻
https://zhidao.baidu.com/question/1303352281702656259.html 百度知道
34240120010721571X 验证不通过~~~
报错信息如下所示:
PHP Fatal error: Uncaught Error: Call to a member function format() on boolean in ...\jxlwqq\id-validator\src\Checker.php:111
Stack trace:
#0 ...\jxlwqq\id-validator\src\IdValidator.php(40): Jxlwqq\IdValidator\IdValidator->_checkBirthdayCode('19\xE8\xAF\x81144')
#1 test.php(8): Jxlwqq\IdValidator\IdValidator->isValid('\xE5\x86\x9B\xE5\xAE\x98\xE8\xAF\x81144125')
#2 {main}
thrown in ...\jxlwqq\id-validator\src\Checker.php on line 111
找到一身份证是 4110821989 开头的,地址是河南省长葛市。
但用这个插件获取到的河南省许昌市,看了下代码,是根据时间线判断了一下取值,导致没取到 411082 对应的长葛市
另外看 行政区划代码 http://www.mca.gov.cn/article/sj/xzqh/1980/?2 长葛市又的确是1995年新增上去的
代码里是不是应该去掉时间线的判断,只需要用最新的 行政区划代码 就可以了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.