=== Iran Phone Format For GForms ===
Contributors: hafezbahari, mrnargil
Tags: gravity forms iran phone, persian digits, gravityforms, گرویتی فرم 
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds Iranian mobile phone format and validation to the Gravity Forms Phone field, with support for Persian and English digits.

== Description ==

The **Iran Phone Format for Gravity Forms** plugin adds a new "Iran" option to the phone format settings within the Gravity Forms Phone field.
This plugin supports both Persian and English digits, automatically normalizing the input before validation to ensure accuracy.

**Features:**
- Adds an "Iran" phone format option to Gravity Forms.
- Uses Regex-based validation for mobile numbers starting with "09".
- Automatically converts Persian digits to English before validation.
- Seamlessly works with both Persian and English numeric inputs.
- Features a translatable error message for easy localization.

Example of a valid number: `09123456789` or `۰۹۱۲۳۴۵۶۷۸۹`

== Video Demonstration ==

[youtube https://www.youtube.com/watch?v=Pk6KkOr3ID0]

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/iran-phone-format-for-gforms/` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Edit your desired form in Gravity Forms, add a 'Phone' field, and set its 'Phone Format' to 'Iran'.
4. Save the form and test it by entering a valid Iranian mobile number.

== Screenshots ==

1. The new "Iran" phone format option in the Gravity Forms field settings.
2. The error message displayed when an invalid number is entered.

== Frequently Asked Questions ==

= Does this plugin work without Gravity Forms? =
No, this plugin is an add-on for Gravity Forms and requires it to be installed and activated.

= Can the error message be changed? =
Yes, the error message is defined using the `__()` function, making it fully translatable through standard WordPress methods.

= Does it support Persian digits? =
Yes, the plugin automatically converts Persian digits to their English equivalents before performing validation.

== Changelog ==
= 1.0.4 =
Tested to WordPress v6.9

= 1.0.3 =
This is a recommended security and stability update. All functions have been prefixed to prevent potential conflicts with other plugins.

= 1.0.2 =
IMPROVEMENT: Prefixed all functions with `ipffg_` to prevent conflicts with other plugins, following WordPress coding standards.

= 1.0.1 =
Readme.txt file Added.

= 1.0.0 =
* Initial release.
* Added Iran phone number format to Gravity Forms.
* Implemented support for both Persian and English digits.
* Included Regex-based validation.

== Upgrade Notice ==

= 1.0.4 =
Tested to WordPress v6.9

= 1.0.3 =
This is a recommended security and stability update. All functions have been prefixed to prevent potential conflicts with other plugins.

= 1.0.2 =
This is a recommended security and stability update. All functions have been prefixed to prevent potential conflicts with other plugins.

= 1.0.1 =
Readme.txt file Added.

= 1.0.0 =
The first version of the plugin – Adds Iranian phone format validation to Gravity Forms.