###该git项目主要是添加了一些验证类(目前只添加了身份证验证类,以后会添加手机号码验证、银行卡号验证等等)
"require": {
"zhangqiang/verify" : "*"
},
"repositories": [
{
"type": "composer",
"url": "https://packagist.org"
}
]
'components' => [
'idcard' => [
'class' => 'Verify\idcard\IdcardVerify'
]
],
if(\Yii::$app->idcard->check('41128219910222051')){
echo "该身份证号码正确";
} else {
echo "该身份证号码有误";
}