Download the PHP package majida/ir-validator without Composer
On this page you can find all versions of the php package majida/ir-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ir-validator
Iranian Validator
A laravel package for validate some Iranian values.
This package verify these values now :
- National Code (کدملی)
- IBAN (شماره شبا)
- Debit Card (شماره کارت بانکی)
- Postal Code (کد پستی)
Installation
1) Run the command below to install via Composer
2) Open your config/app.php and add the following to the providers array:
Usage
IrValidator works same as another Laravel Validation rules.
Rules
national_code
A rule for validating Iranian national code (How calculated)
--OR--
iban
A rule for validating IBAN (International Bank Account Number) known in Iran as Sheba. (How calculated)
Add false optional parameter after iban, If IBAN doesn't begin with IR, so the validator will add IR as default to the account number:
If you want to validate non Iranian IBAN, add the 2 letters of country code after false optional parameter:
debit_card
A rule for validating Iranian debit cards. (How calculated)
--OR--
You can add an optional parameter if you want to validate a card from a specific bank:
List of the bank codes:
- bmi (بانک ملی)
- banksepah (بانک سپه)
- edbi (بانک توصعه صادرات)
- bim (بانک صنعت و معدن)
- bki (بانک کشاورزی)
- bank-maskan (بانک مسکن)
- postbank (پست بانک ایران)
- ttbank (بانک توسعه تعاون)
- enbank (بانک اقتصاد نوین)
- parsian-bank (بانک پارسیان)
- bpi (بانک پاسارگاد)
- karafarinbank (بانک کارآفرین)
- sb24 (بانک سامان)
- sinabank (بانک سینا)
- sbank (بانک سرمایه)
- shahr-bank (بانک شهر)
- bank-day (بانک دی)
- bsi (بانک صادرات)
- bankmellat (بانک ملت)
- tejaratbank (بانک تجارت)
- refah-bank (بانک رفاه)
- ansarbank (بانک انصار)
- mebank (بانک مهر اقتصاد)
postal_code
--OR--
Contribute
Contributions to the package are always welcome!
- Report any idea, bugs or issues you find on the issue tracker.
-
You can grab the source code at the package's Git repository.
License
All contents of this package are licensed under the MIT license.