diff --git a/README.md b/README.md index 1cf4747..d7bb04a 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,7 @@ Ready-to-Use Masks - **Prefix and Suffix Options**: Add prefixes and suffixes to your masks for better input guidance. - **Minimum and Maximum Character Validation**: Ensure inputs meet your character length requirements. - **Inputmode Control**: Customize the input type for better usability across devices. - -🚀 **Coming Soon to the PRO Version** -- Built-in **validation for CPF, CNPJ**, and other formats. -- And much more… +- **Built-in **validation for CPF, CNPJ**. **PRO VERSION** [Check the PRO version here](https://codecanyon.net/item/form-masks-for-elementor/25872641) @@ -83,6 +80,10 @@ Yes, but this feature is available only in the PRO version. With the PRO version ## Changelog ``` += 2.2 = +* New: add support to CPF (Brazilian ID) and CNPJ (Brazilian Company ID) validation on pro version. +* Changed: code improvements. + = 2.1 = * New: support to controls from version Pro. * Changed: code improvements. diff --git a/form-masks-for-elementor.php b/form-masks-for-elementor.php index 6f005c5..8132cde 100644 --- a/form-masks-for-elementor.php +++ b/form-masks-for-elementor.php @@ -5,7 +5,7 @@ * Description: Form Masks for Elementor create a custom control in field advanced tab for your customize your fields with masks. This plugin require the Elementor Pro (Form Widget). * Author: EduardoVillao.me * Author URI: https://eduardovillao.me/ - * Version: 2.1 + * Version: 2.2 * Requires at least: 5.5 * Requires PHP: 7.4 * Text Domain: form-masks-for-elementor @@ -35,7 +35,7 @@ define( 'FME_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); define( 'FME_PLUGN_URL', plugin_dir_url( __FILE__ ) ); -define( 'FME_VERSION', '2.1' ); +define( 'FME_VERSION', '2.2' ); define( 'FME_PHP_MINIMUM_VERSION', '7.4' ); define( 'FME_WP_MINIMUM_VERSION', '5.5' ); diff --git a/includes/class-elementor-mask-control.php b/includes/class-elementor-mask-control.php index a4fd3ef..8e1b96b 100644 --- a/includes/class-elementor-mask-control.php +++ b/includes/class-elementor-mask-control.php @@ -122,6 +122,29 @@ public function add_mask_control( $element, $args ) { ], ], ], + 'fme_mask_validation_control' => [ + 'label' => esc_html__( 'Validaiton', 'form-masks-for-elementor' ) . $pro_tag, + 'description' => esc_html__( 'Built-in validation ensures accurate input and prevents submission errors.', 'form-masks-for-elementor' ), + 'type' => \Elementor\Controls_Manager::SELECT, + 'default' => 'select', + 'options' => [ + 'select' => esc_html__( 'Select', 'form-masks-for-elementor' ), + 'cpf' => esc_html__( 'CPF (Brazilian ID)', 'form-masks-for-elementor' ), + 'cnpj' => esc_html__( 'CNPJ (Brazilian Company ID)', 'form-masks-for-elementor' ), + ], + 'tab' => 'content', + 'tabs_wrapper' => 'form_fields_tabs', + 'inner_tab' => 'form_fields_advanced_tab', + 'conditions' => [ + 'terms' => [ + [ + 'name' => 'field_type', + 'operator' => 'in', + 'value' => [ 'text' ], + ], + ], + ], + ], 'fme_mask_reverse_control' => [ 'label' => esc_html__( 'Mask Reverse?', 'form-masks-for-elementor' ) . $pro_tag, 'description' => esc_html__( 'Reverse mode is to format values dynamically as the user types, starting from the right (e.g., 0.01, 1.23, 12.34). Is commonly used for currency masks where the value grows from the decimal point.', 'form-masks-for-elementor' ), diff --git a/readme.txt b/readme.txt index dbd87ed..a362525 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://eduardovillao.me/ Tags: elementor, elementor form, form mask Requires at least: 5.5 Tested up to: 6.7 -Stable tag: 2.1 +Stable tag: 2.2 Requires PHP: 7.4 License: GPLv2License URI:https://www.gnu.org/licenses/gpl-2.0.html @@ -43,10 +43,7 @@ Ready-to-Use Masks * **Prefix and Suffix Options**: Add prefixes and suffixes to your masks for better input guidance. * **Minimum and Maximum Character Validation**: Ensure inputs meet your character length requirements. * **Inputmode Control**: Customize the input type for better usability across devices. - -🚀 **Coming Soon to the PRO Version** -* Built-in **validation for CPF, CNPJ**, and other formats. -* And much more… +* **Built-in **validation for CPF, CNPJ**. **PRO VERSION** [Check the PRO version here](https://codecanyon.net/item/form-masks-for-elementor/25872641) @@ -98,6 +95,10 @@ Yes, but this feature is available only in the PRO version. With the PRO version == Changelog == += 2.2 = +* New: add support to CPF (Brazilian ID) and CNPJ (Brazilian Company ID) validation on pro version. +* Changed: code improvements. + = 2.1 = * New: support to controls from version Pro. * Changed: code improvements.