-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added Uruguay ID (IC) validator #95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there 👍
$this->invalidIds = [ | ||
'46057422', | ||
'90224632', | ||
'52631437', | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get at least two more invalid ids?
$baseDigit = $baseNumber[$i]; | ||
$ciDigit = $id[$i]; | ||
|
||
$a += (intval($baseDigit) * intval($ciDigit)) % 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a cast to int rather than intval
for better performance
Fixes done |
* Create Europe folder * Add Europe folder to tests * Implement USA validator * Change name to United States instead * Implement Canada * Follow PSR * Small fix * Sort config validators alphabetically * Add link to source information for the algorithms of Belgium. (#75) * Feature/make classes abstract (#88) * Make Gender.php class abstract * Make Countries.php class abstract * Fix ID validation Belgium. (#91) * Added Chile ID (RUT) validator (#81) * Implement Chile ID validator and tests * Added Argentina ID (CUIL/CUIT) validator (#80) * Implement Argentina ID validator and tests Co-authored-by: Rodolpho Lima <[email protected]> * Added Uruguay ID (IC) validator (#95) * implement Uruguay ID validator * improvements uruguay id validator Co-authored-by: Rodolpho Lima <[email protected]> * feat: Mexican ID Validator (#78) Implement Mexico * Added Peru ID (CUI) validator (#98) * Added Peru ID validation Co-authored-by: Rodolpho Lima <[email protected]> * Add german TIN validator (#97) * Add german TIN validator * Adjust documentation for germany * Added Ecuador ID (IC) validator (#104) * implement ecuador id * fixes ecuador validator Co-authored-by: Rodolpho Lima <[email protected]> * Add countries constants * add missing countries and update docs * Remove Laravel locale detection * Remove locale detection test * Add native DateTime support and deprecate the old getDateOfBirth method (#109) * Add getDateOfBirthNative() method * Fix Belgium integration * Update InvalidLengthException.php (#110) * Improve Contributing Guide (#111) * Update CONTRIBUTING.md * Remove unnecessary trim * Remove unnecessary trim * Small fix * [v1.3.0] Disable Luxembourg and improve documentation (#112) * Remove Luxembourg * Improve docs * Fix Luxembourg tests * Update image * Update Build yml file * Add support for PHP 8 (#114) * Add support for PHP 8 Co-authored-by: João Cruz <[email protected]> Co-authored-by: Yves Bos <[email protected]> Co-authored-by: bofalke <[email protected]> Co-authored-by: Rodolpho Lima <[email protected]> Co-authored-by: Rodolpho Lima <[email protected]> Co-authored-by: tiagomichaelsousa <[email protected]>
resolve #94
It includes the validator itself and unit tests.