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

Implement {validator}::sanitize #77

Closed
wants to merge 5 commits into from
Closed

Conversation

cottton
Copy link
Contributor

@cottton cottton commented Sep 16, 2019

  • ValidatorInterface new method ::sanitize

  • ValidatorAbstract new static method ::sanitize

  • Vies::filterVat "moved" to ValidatorAbstract::sanitize (default sanitization(?))

  • ValidatorBE::sanitize calls parent::sanitize FIRST (clean up) and then adds missing leading zero.)
    Note: keeping Vies::filterVat because it was public and some users may rely on it. But it now redirects to ValidatorAbstract::sanitize.

  • Vies::validateVatSum now updating the $vatNumber by reference.

  • Vies::validateVatSum calls $validator ::sanitize and then ::validate.

Note: added notes like #DISABLED - ... and ## todo ... which should be deleted before release.

- `Vies::filterVat` "moved" to `ValidatorAbstract::sanitize` (default sanitization(?))
- `ValidatorBE::sanitize` calls `parent::sanitize` FIRST (clean up) and then adds missing leading zero.)
Note: keeping `Vies::filterVat` because it was public and some users may rely on it. But it now redirects to `ValidatorAbstract::sanitize`.
- `Vies::validateVatSum` now updating the `$vatNumber` by reference.
- `Vies::validateVatSum` calls `$validator` `::sanitize` and then `::validate`.
@DragonBe
Copy link
Owner

Please see my remark #76 (comment) why I reject this PR.

@DragonBe DragonBe closed this Sep 28, 2019
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.

None yet

2 participants