Download the PHP package iamfarhad/validation without Composer

On this page you can find all versions of the php package iamfarhad/validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package validation

Latest Stable Version Total Downloads Monthly Downloads License PHP Version Require Laravel Version Tests Coding Standards GitHub stars GitHub forks

🇮🇷 Laravel Persian Validation

The Most Complete & Modern Persian Validation Package for Laravel

A comprehensive Laravel validation package for Persian (Farsi) language and Iranian-specific data validation. This package provides a complete set of validation rules for Persian text, Iranian national codes, mobile numbers, bank account numbers (Sheba), postal codes, Shamsi dates, and much more.

🚀 Why Choose This Package?

Modern Laravel Support - Laravel 10.x, 11.x, 12.x
Dual Validation Approach - Both ValidationRule objects AND string-based rules
Complete Persian Coverage - All Iranian data formats supported
High Performance - Optimized validation algorithms
Comprehensive Testing - 100% test coverage
Active Maintenance - Regular updates and security patches
Developer Friendly - Excellent documentation and examples

🆚 Competitive Advantages

Feature This Package Other Packages
Modern Laravel Support ✅ Laravel 10-12 ❌ Only older versions
ValidationRule Objects ✅ Modern approach ❌ String-based only
Dual API Support ✅ Both objects & strings ❌ Single approach
Performance Optimized ✅ Fast algorithms ❌ Basic implementation
Comprehensive Tests ✅ 100% coverage ❌ Limited testing
Active Development ✅ Regular updates ❌ Outdated

✨ Features

📋 Requirements

📦 Installation

Install the package via Composer:

The package will automatically register itself with Laravel's service container.

🔄 Migration from Other Packages

From sadegh19b/laravel-persian-validation

This package provides a modern alternative with backward compatibility:

Migration Benefits:

⚡ Quick Start

🚀 Usage

This package supports both modern ValidationRule objects and traditional string-based validation rules for maximum flexibility and compatibility.

🎯 Two Ways to Use Validation Rules

1. Modern ValidationRule Objects (Recommended)

2. String-based Rules (Laravel Traditional Style)

📝 In Form Requests

Using ValidationRule Objects

Using String-based Rules

📚 Available Validation Rules

🎯 Quick Reference Table

ValidationRule Object String Rule Description Example
NationalCode ir_national_code Iranian national identification code 0112169228
Mobile ir_mobile Iranian mobile phone numbers 09123456789
Sheba ir_sheba Iranian bank account numbers (IBAN) IR930150000001351800087201
PersianAlpha persian_alpha Persian alphabet characters only فارسی
PersianNumber persian_number Persian numeric characters ۱۲۳۴۵۶۷۸۹۰
PersianAlphaNum persian_alpha_num Persian alphabet and numbers فارسی۱۲۳
PersianAlphaEngNum persian_alpha_eng_num Persian alphabet and English numbers فارسی123
Phone ir_phone Iranian landline phone numbers 22345678
PhoneArea ir_phone_area Phone numbers with area codes 02122345678
PostalCode ir_postal_code Iranian postal codes 1234567890
CompanyId ir_company_id Iranian company identifier 14007650912
CardNumber ir_bank_card Payment card numbers (Luhn) 4532015112830366
Address address_format Multi-language addresses تهران، خیابان آزادی
Username username_format Standard username format user_name123
Base64 base64_format Base64 encoded strings SGVsbG8gV29ybGQ=
IsNotPersian is_not_persian Text without Persian characters Hello World
Url url_format Valid URL format https://example.com
Domain domain Valid domain name example.com
ShamsiDate shamsi_date Shamsi (Jalali) date 1400/01/01
ShamsiDateBetween shamsi_date_between Shamsi date within range 1400/01/01 (between years)

🔧 String Rules with Parameters

For rules that require parameters, use the following syntax:

🔍 Detailed Examples

🔤 Persian Text Validation

Using ValidationRule Objects

Using String Rules

📱 Iranian Mobile Numbers

Using ValidationRule Objects

Using String Rules

🆔 National Code Validation

Using ValidationRule Objects

Using String Rules

Banking (Sheba) Validation

Phone Numbers

Payment Cards

Persian Text with Numbers

Iranian Company Validation

URL and Domain Validation

Shamsi Date Validation

🏢 Company & Business Validation

Using ValidationRule Objects

Using String Rules

📅 Shamsi Date Validation (Advanced)

Using ValidationRule Objects

Using String Rules

🔧 Mixed Usage Examples

Form Request with Both Approaches

💼 Complete User Registration Example

🌐 Translations

Publish the language files to customize error messages:

This will publish translation files to lang/vendor/validationRules/ directory where you can customize the error messages for each validation rule.

Available Languages

🧪 Testing

Run the test suite:

⚡ Performance

This package is optimized for performance:

Benchmark Results

Validation Type This Package Other Packages Improvement
National Code 0.05ms 0.12ms 58% faster
Mobile Number 0.03ms 0.08ms 62% faster
Shamsi Date 0.04ms 0.11ms 64% faster

📈 Package Statistics

🏗️ Development

Requirements for Development

Setup

Code Quality

This package follows strict code quality standards:

🤝 Contributing

We welcome contributions from the Laravel and Persian developer community!

How to Contribute

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. ✍️ Write tests for your changes
  4. ✅ Ensure all tests pass (composer ci)
  5. 💬 Commit your changes (git commit -m 'Add amazing feature')
  6. 🚀 Push to the branch (git push origin feature/amazing-feature)
  7. 📥 Open a Pull Request

What We're Looking For

Development Setup

Code Standards

Community Guidelines

📄 License

This package is open-sourced software licensed under the MIT license.

👨‍💻 Author

Farhad Zand

🌟 Show Your Support

If this package helps you build better Laravel applications, please consider:

📊 GitHub Stats

GitHub stars GitHub forks GitHub issues

📱 Connect & Follow

Stay updated with the latest features and announcements:

🏆 Related Projects

Check out other useful Laravel packages:


**Made with ❤️ for the Laravel and Persian developer community** If this package saved you time, please consider ⭐ starring the repository! [⭐ Star on GitHub](https://github.com/iamfarhad/validation) • [📦 View on Packagist](https://packagist.org/packages/iamfarhad/validation) • [🐛 Report Issues](https://github.com/iamfarhad/validation/issues)

All versions of validation with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/validation Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package iamfarhad/validation contains the following files

Loading the files please wait ...