Skip to content

Releases: tanthammar/laravel-rules

SpanishBusinessId also supports Resident and Non-Resident entities

27 Jan 07:44

Choose a tag to compare

More Spanish formats supported by SpanishBusinessId Rule (fake number examples)

  • Company (CIF): ESB82683907 (Example of a Sociedad Limitada)
  • Resident (NIF/DNI): ES12345678Z (8 digits + Checksum)
  • Foreigner (NIE): ESX12345678 (Letter X/Y/Z + 7/8 digits + Checksum)
  • Non-Resident Entity: ESN12345678

Spanish business id validation

27 Jan 07:11

Choose a tag to compare

6.3.0

Spanish business id validation

fix incorrect import namespace

20 Jan 09:34

Choose a tag to compare

6.2.1

fix broken namespace on import

Validate Finnish business numbers (FIXXXXXXX-X)

17 Jan 10:19

Choose a tag to compare

support Finnish business numbers

Mina källor:

- Finska skattemyndighetens (Verohallinto) officiella dokumentation
- PRH (Patent- och registerstyrelsen) specifikationer
- Jämförelse med befintliga open-source implementationer i andra språk

added BusinessNameFromVatID case

03 Jul 18:17

Choose a tag to compare

Enhance BusinessNameFromVatID service with improved error handling

  • Add Invalid error case to BusinessNameLookupError enum for invalid VAT IDs
  • Add label() method to BusinessNameLookupError for human-readable messages
  • Pre-validate VAT format before external API calls to avoid unnecessary requests
  • Update README documentation to reflect new error handling capabilities

🤖 Generated with Claude Code

fix name removed in last commit

03 Jul 17:45

Choose a tag to compare

6.0.1

fix only name return

BREAKING CHANGE: Refactor BusinessNameFromVatID to returns ENUM instead of translated strings

03 Jul 17:36

Choose a tag to compare

BREAKING CHANGE: Refactor BusinessNameFromVatID to returns ENUM instead of translated strings

  • Add BusinessNameLookupError enum for error cases (Unknown, ServiceUnavailable)
  • BusinessNameFromVatID::lookup() now returns object|BusinessNameLookupError instead of string
  • On success: returns full VAT details object with name, address, vatNumber properties
  • On error: returns BusinessNameLookupError enum instead of translated error messages
  • Update README.md with new usage examples showing error handling patterns

This change provides access to complete VAT information while maintaining clean error handling through enums.

New Vat rules, drop laravel 9, breaking return types

03 Jul 15:27

Choose a tag to compare

✅ New: VatNumberAPI

✅ BREAKING CHANGE: Laravel 9 Support Dropped

  • Removed Laravel 9.0 support, now requires Laravel 10.0+

✅ BREAKING CHANGE: BusinessNameFromVatID Return Values

  • File: src/Services/BusinessNameFromVatID.php
  • Change: Now returns exception messages instead of generic "unknown" message when API is unavailable
  • Impact: Different error messages returned, may break code expecting specific text
  • Before: Always returned trans('laravel-rules::messages.vat-name-unknown') on API failure
  • After: Returns specific API error messages like "VIES EU Vat service api is unavailable. Please try again later." trans('laravel-rules::messages.vies-eu-unavailable')

✅ NON-BREAKING: Deprecation Warnings

  • File: src/Rules/VatNumber.php
  • Change: Added deprecation notice but maintained existing behavior
  • Impact: No breaking change, just deprecation warning

✅ NON-BREAKING: RuleHelpers Refactoring

  • File: src/RuleHelpers.php
  • Change: Methods now delegate to new service classes but maintain same signatures
  • Impact: No breaking change to public API

update dependencies

03 Jul 08:52

Choose a tag to compare

Updated

  • brick/phonenumber from 0.6.0 to 0.8.0
  • organisationsnummer/organisationsnummer from 1.x to 2.1.0

Bumping v, but no known breaking changes.
There are no known breaking changes related to rules in this pkg but if you use other parts of those dependencies read each pkg breaking changes.

fix validation trans path

01 Jul 22:13

Choose a tag to compare

3.4.1

trans path