persian — Playground
Try it
Section titled “Try it”Type a value in Persian, Arabic or Latin digits and pick a mode. Every result comes from @nexload-sdk/persian running in your browser.
| Mode | Input | Functions used |
|---|---|---|
IRR / IRT | A whole number of rials | parseMoney, formatMoney from @nexload-sdk/persian/money |
mobile | An Iranian mobile number in any common form | validateIranMobile, toE164Mobile, formatIranMobile from @nexload-sdk/persian/mobile |
national-code | A 10-digit کد ملی | validateNationalCode from @nexload-sdk/persian/identity |
card | A 16-digit bank card, separators allowed | validateCardNumber, formatCardNumber, detectBankByCard from @nexload-sdk/persian/bank |
sheba | A Sheba (IBAN) starting with IR | validateSheba, formatSheba, detectBankBySheba from @nexload-sdk/persian/bank |
jalali | An ISO date-time with an offset | formatJalali from @nexload-sdk/persian/date, time zone Asia/Tehran |
Read the result
Section titled “Read the result”- Fractional prices are invalid. When a rial amount cannot convert exactly to tomans, the formatter keeps rials:
12501inIRTshows۱۲٬۵۰۱ ریال. - Invalid identifiers show the SDK’s reason code, for example
invalid_checksum. Use the same codes in your own error messages. - Try
۰۹۱۲۳۴۵۶۷۸۹inmobile,۰۰۸۴۵۷۵۹۴۸innational-codeandIR820540102680020817909002insheba.