Download the PHP package tanthammar/laravel-rules without Composer
On this page you can find all versions of the php package tanthammar/laravel-rules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tanthammar/laravel-rules
More information about tanthammar/laravel-rules
Files in tanthammar/laravel-rules
Package laravel-rules
Short Description Custom validation rules for the Laravel Framework
License MIT
Homepage https://github.com/tanthammar/laravel-rules
Informations about the package laravel-rules
Laravel Rules & Validators
Custom validation rules, factory helpers, and services for Laravel applications, with a focus on Swedish localization.
Requirements
- PHP 8.1+
- Laravel 10.0+
Installation
Validation Rules
Swedish Personal & Organization Numbers
Phone Numbers
Swedish Banking
VAT Number Validation
⚠️ Important: Choose the right VAT validation rule based on your needs:
VatNumberFormat (Recommended for most cases)
Only validates the format using regex - no external API calls.
VatNumberAPI (Use with caution)
Validates against the VIES EU API but throws exceptions when service is unavailable.
VatNumberAPIWithFormatFallback (Balanced approach)
Tries API validation first, falls back to format validation if service is unavailable.
Geographic Coordinates
File Upload Validation
Factory Helpers
Generate realistic test data for Swedish formats:
Services
VAT Information Lookup
Get Business Name Only
Get Full VAT Details Object
Business Type Detection
Legacy Helper Methods (Deprecated)
These methods are deprecated but still available for backwards compatibility:
All versions of laravel-rules with dependencies
brick/phonenumber Version ^0.8.0
byrokrat/banking Version ^2.2
laravel/framework Version ^10.0|^11.0|^12.0
personnummer/personnummer Version ^3.0.4
organisationsnummer/organisationsnummer Version ^2.0.0
mpociot/vat-calculator Version ^3.22.0
spatie/laravel-package-tools Version ^1.9.2
tanthammar/laravel-extras Version dev-master