PHPackages                             alishpersian/persian-validation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. alishpersian/persian-validation

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

alishpersian/persian-validation
===============================

Alish persian validation

5.3.x-dev(4y ago)04MITPHP

Since Oct 4Pushed 4y agoCompare

[ Source](https://github.com/webalish/Alish-Persian-Validation)[ Packagist](https://packagist.org/packages/alishpersian/persian-validation)[ RSS](/packages/alishpersian-persian-validation/feed)WikiDiscussions 5.3 Synced 4w ago

READMEChangelogDependencies (2)Versions (1)Used By (0)

Alish Persian Validation
========================

[](#alish-persian-validation)

Alish Persian Validation provides validation for Persian alphabet, number and etc.

Requirement
-----------

[](#requirement)

- Laravel 5.\*
- PHP 5.5 &gt;=

License
-------

[](#license)

Alish Persian Validation is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

Install
-------

[](#install)

Via Composer

```
$ composer require Alishpersian/Validation
```

Config
------

[](#config)

Add the following provider to providers part of config/app.php

```
Alishpersian\Validation\AlishValidationServiceProvider::class
```

vendor:publish
--------------

[](#vendorpublish)

You can run vendor:publish command to have custom lang file of package on this path ( resources/lang/validation )

Usage
-----

[](#usage)

You can access to validation rules by passing the rules key according blew following table:

RulesDescriptionsalish\_alphaPersian alphabetalish\_numPersian numbersalish\_alpha\_numPersian alphabet and numbersiran\_mobileIran mobile numbersshebaIran Sheba numbersmelli\_codeIran melli codeis\_not\_persianDoesn't accept Persian alphabet and numberslimited\_arrayCheck variable is array and array must be lesser and equal than parameterunsigned\_numCheck variable is unsigned numbersalpha\_spaceAccept Persian, English and ... alphabet, space charactera\_urlCheck correct URLa\_domainCheck correct DomainmoreCheck value be max and not equal toolessCheck value be min and not equal tooiran\_phoneIran phone numberscard\_numberPayment card numbersaddressAccept Persian, English and ... alphabet, Persian and English numbers and some special charactersiran\_postal\_codeIran postal codepackage\_nameCheck APK package name### Alish Alpha

[](#alish-alpha)

Accept Persian language alphabet according to standard Persian, this is the way you can use this validation rule:

```
$input = [ 'فارسی' ];

$rules = [ 'alish_alpha' ];

Validator::make( $input, $rules );

```

### Persian numbers

[](#persian-numbers)

Validate Persian standard numbers (۰۱۲۳۴۵۶۷۸۹):

```
$input = [ '۰۱۲۳۴۵۶۷۸۹' ];

$rules = [ 'alish_num' ];

Validator::make( $input, $rules );

```

### Persian Alpha Num

[](#persian-alpha-num)

Validate Persian alpha num:

```
$input = [ 'فارسی۱۲۳۴۵۶۷۸۹' ];

$rules = [ 'alish_alpha_num' ];

Validator::make( $input, $rules );

```

### Iran mobile phone

[](#iran-mobile-phone)

Validate Iran mobile phones (irancel, rightel, hamrah-e-aval, ...):

```
$input = [ '09381234567' ];

$rules = [ 'iran_mobile' ];

Validator::make( $input, $rules );

```

### Sheba number

[](#sheba-number)

Validate Iran bank sheba numbers:

```
$input = [ 'IR042960000000100789200001' ];

$rules = [ 'sheba' ];

Validator::make( $input, $rules );

```

### Iran national code

[](#iran-national-code)

Validate Iran national code (melli-code):

```
$input = [ '3240175800' ];

$rules = [ 'melli_code' ];

Validator::make( $input, $rules );

```

### Payment card number

[](#payment-card-number)

Validate Iran payment card numbers:

```
$input = [ '6274129005473742' ];

$rules = [ 'card_number' ];

Validator::make( $input, $rules );

```

### Iran postal code

[](#iran-postal-code)

Validate Iran postal code:

```
$input = [ '167197-35744' ];

$rules = [ 'iran_postal_code' ];

Validator::make( $input, $rules );

$input = [ '16719735744' ];

$rules = [ 'iran_postal_code' ];

Validator::make( $input, $rules );

```

More
----

[](#more)

Here is full list of Alishpersian validation rules usage:

```
Validator::make( $request->all(), [

  'name'          => 'alish_alpha|unique|max:25', // Validate Persian alphabet, unique and max to 25 characters

  'age'           => 'alish_num|required',  // Validate Persian numbers and check it's required

  'city'          => 'alish_alpha_num|min:10',  // Validate persian alphabet & numbers at least 10 digit accepted

  'mobile'        => 'iran_mobile', // Validate mobile number

  'sheba_number'  => 'sheba', // Validate sheba number of bank account

  'melli_code'    => 'melli_code',  // Validate melli code number

  'latin_name'    => 'is_not_persian',  // Validate alphabet and doesn't contain Persian alphabet or number

  'your_array'    => 'limited_array:2', // Validate your array variable and must be contian 2 member or lesser

  'url'           => 'a_url', // Validate url

  'domain'        => 'a_domain',  // Validate domain

  'more'          => 'more:10', // Validate value be more than parameter

  'less'          => 'less:10', // Validate value be less than parameter

  'phone'         => 'iran_phone', // Validate phone number

  'card_number'   => 'card_number', // Validate payment card number

  'address'       => 'address' // validate Persian, English and ... alphabet, Persian and English numbers and some special characters

  'postal_code'   => 'iran_postal_code' // validate iran postal code format

  'package_name'  => 'package_name' // validate APK package name

]);
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1678d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/df33d6da802f92e928f3d6e0128bbc5b143d7944e3fe6b63b763cd5980adf514?d=identicon)[webalish](/maintainers/webalish)

---

Top Contributors

[![alish-co](https://avatars.githubusercontent.com/u/91735628?v=4)](https://github.com/alish-co "alish-co (11 commits)")

---

Tags

laravelcheckvalidationlumenvalidatepersianfarsi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alishpersian-persian-validation/health.svg)

```
[![Health](https://phpackages.com/badges/alishpersian-persian-validation/health.svg)](https://phpackages.com/packages/alishpersian-persian-validation)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M106](/packages/propaganistas-laravel-phone)[sadegh19b/laravel-persian-validation

A comprehensive Laravel validation package for Persian text, numbers, dates, and Iranian national identifiers

18293.8k1](/packages/sadegh19b-laravel-persian-validation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[iamfarhad/validation

🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes &amp; more. Modern Laravel 10-12 support with both ValidationRule objects &amp; string-based rules.

2917.3k](/packages/iamfarhad-validation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
