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

Added Uruguay ID (IC) validator #95

Merged
merged 2 commits into from
Oct 10, 2020
Merged

Added Uruguay ID (IC) validator #95

merged 2 commits into from
Oct 10, 2020

Conversation

gheleri
Copy link
Contributor

@gheleri gheleri commented Oct 9, 2020

resolve #94
It includes the validator itself and unit tests.

Copy link
Collaborator

@AlexOlival AlexOlival left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nearly there 👍

Comment on lines 29 to 33
$this->invalidIds = [
'46057422',
'90224632',
'52631437',
];
Copy link
Collaborator

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;
Copy link
Collaborator

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

@gheleri
Copy link
Contributor Author

gheleri commented Oct 10, 2020

Fixes done

@AlexOlival AlexOlival merged commit 9818ecf into reducktion:release-1.3.0 Oct 10, 2020
@gheleri gheleri deleted the feat/uruguay-id branch October 11, 2020 10:31
AlexOlival added a commit that referenced this pull request Feb 6, 2021
* 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]>
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.

2 participants