Skip to content

Update readme: add strict parameter to check and isValid #40

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

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ try {
}
```

## Strict Mode

If you want to use a stricter method (without normalizing the TIN number, that is, using the raw TIN number), use the `strict` parameter in the `check` or `isValid` functions as shown below (Introduced in [#39](https://github.com/loophp/tin/pull/39)). By default, it is set to `false`.

```php
TIN::fromSlug('be7110.2512345')->check(); // Not strict
TIN::fromSlug('be7110.2512345')->check(strict: false); // Not strict
TIN::fromSlug('be7110.2512345')->check(true); // Strict
TIN::fromSlug('be7110.2512345')->check(strict: true); // Strict


## Installation

`composer require loophp/tin`
Expand Down
Loading