- How do I install laravel-persian-validation?
- Install the package with Composer using composer require sadegh19b/laravel-persian-validation. Follow the README for any service provider registration or configuration publishing steps. Then use the rules in form requests, controllers, or custom validators.
- Which Laravel versions does laravel-persian-validation support?
- The 2.x release line includes a release that adds Laravel 13 support, and the package is built for standard Laravel applications. The provided context does not list a full compatibility matrix, so check composer.json for the exact Laravel and PHP constraints. Confirm whether support covers Laravel 13 stable or a pre-release before upgrading.
- What validation rules does this package provide for Persian text and numbers?
- The package provides rules for Persian text, numbers, dates, Iranian national ID codes, bank card numbers, IBAN or Sheba, postal codes, and mobile numbers. You apply them with familiar Laravel validation syntax in requests, controllers, or custom validators. Refer to the README for the exact rule names and accepted formats.
- Can I validate Iranian national ID and bank card numbers with Laravel?
- Yes. The package includes rules for Iranian national identifiers and bank card numbers, along with IBAN or Sheba and postal codes. Use them as standard Laravel validation rules and combine them with other constraints as needed.
- Does it support Persian dates and Jalali date validation?
- The package provides validation for Persian dates as part of its rule set. It is intended for checking Iranian-specific date input in Laravel forms and APIs. Confirm the exact accepted formats and rule names in the package documentation.
- How do I get Persian or localized error messages for validation failures?
- The package is described as providing localized error messages for Iranian-specific validation. You can also customize Laravel validation messages in your language files and set readable attribute names. Check whether the package publishes translation files or relies on Laravel's translation system.
- Is laravel-persian-validation compatible with Laravel 13?
- A 2.x release explicitly adds Laravel 13 support, so the package is intended to be a green dependency when planning that upgrade. Verify whether the support targets Laravel 13 stable or a pre-release and confirm the Composer constraint is additive rather than a hard cut. Test it in a non-production branch during your Laravel 13 upgrade spike.
- What PHP version do I need for laravel-persian-validation?
- The PHP version requirement is defined in the package composer.json and was not specified in the provided release context. Check the published php and illuminate constraints before installing. Also verify that those constraints match your runtime images.
- Can I use laravel-persian-validation in form requests and API validation?
- Yes. Its rules are intended for use with Laravel's validator, so they work in FormRequest classes, inline validators, and API request validation. Combine them with required, nullable, and other standard Laravel rules as needed.
- Is this package actively maintained and safe for production use?
- The 2.x line has a release adding Laravel 13 compatibility, which is a positive maintenance signal. However, maintainer concentration, download history, and advisory status are unverified in the provided assessment. Pin a known working version, review the Composer constraints and CI matrix, and run your own integration tests before production use.