MW WP Form - Version 2.2.2

Version Description

  • Bug fix : Fixed a tel validation bug.
  • Bug fix : Fixed a zip validation bug.
  • Bug fix : Fixed a in validation bug.
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin MW WP Form
Version 2.2.2
Comparing to
See all releases

Code changes from version 2.2.1 to 2.2.2

classes/validation-rules/class.in.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Name : MW WP Form Validation Rule In
4
  * Description: 値が、配列で指定された中に含まれている
5
- * Version : 1.1.0
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : July 21, 2014
9
- * Modified : December 31, 2014
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
@@ -27,15 +27,22 @@ class MW_WP_Form_Validation_Rule_In extends MW_WP_Form_Abstract_Validation_Rule
27
  */
28
  public function rule( $key, array $options = array() ) {
29
  $value = $this->Data->get( $key );
 
30
  if ( !is_null( $value ) && !MWF_Functions::is_empty( $value ) ) {
31
  $defaults = array(
32
  'options' => array(),
33
  'message' => __( 'This value is invalid.', MWF_Config::DOMAIN )
34
  );
35
  $options = array_merge( $defaults, $options );
36
- if ( !( is_array( $options['options'] ) && in_array( $value, $options['options'] ) ) ) {
37
- return $options['message'];
 
 
 
 
 
38
  }
 
39
  }
40
  }
41
 
2
  /**
3
  * Name : MW WP Form Validation Rule In
4
  * Description: 値が、配列で指定された中に含まれている
5
+ * Version : 1.1.1
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : July 21, 2014
9
+ * Modified : January 17, 2014
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
27
  */
28
  public function rule( $key, array $options = array() ) {
29
  $value = $this->Data->get( $key );
30
+ $value = ( string ) $value;
31
  if ( !is_null( $value ) && !MWF_Functions::is_empty( $value ) ) {
32
  $defaults = array(
33
  'options' => array(),
34
  'message' => __( 'This value is invalid.', MWF_Config::DOMAIN )
35
  );
36
  $options = array_merge( $defaults, $options );
37
+ if ( is_array( $options['options'] ) ) {
38
+ foreach ( $options['options'] as $option ) {
39
+ $option = ( string ) $option;
40
+ if ( $value === $option ) {
41
+ return;
42
+ }
43
+ }
44
  }
45
+ return $options['message'];
46
  }
47
  }
48
 
classes/validation-rules/class.tel.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Name : MW WP Form Validation Rule Tel
4
  * Description: 値が電話番号
5
- * Version : 1.1.0
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : July 21, 2014
9
- * Modified : December 31, 2014
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
@@ -27,7 +27,7 @@ class MW_WP_Form_Validation_Rule_Tel extends MW_WP_Form_Abstract_Validation_Rule
27
  */
28
  public function rule( $key, array $options = array() ) {
29
  $value = $this->Data->get( $key );
30
- if ( !empty( $value ) ) {
31
  $defaults = array(
32
  'message' => __( 'This is not the format of a tel number.', MWF_Config::DOMAIN )
33
  );
2
  /**
3
  * Name : MW WP Form Validation Rule Tel
4
  * Description: 値が電話番号
5
+ * Version : 1.1.1
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : July 21, 2014
9
+ * Modified : January 16, 2015
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
27
  */
28
  public function rule( $key, array $options = array() ) {
29
  $value = $this->Data->get( $key );
30
+ if ( !is_null( $value ) && !MWF_Functions::is_empty( $value ) ) {
31
  $defaults = array(
32
  'message' => __( 'This is not the format of a tel number.', MWF_Config::DOMAIN )
33
  );
classes/validation-rules/class.zip.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Name : MW WP Form Validation Rule Zip
4
  * Description: 値が郵便番号
5
- * Version : 1.1.0
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : July 21, 2014
9
- * Modified : December 31, 2014
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
@@ -27,7 +27,7 @@ class MW_WP_Form_Validation_Rule_Zip extends MW_WP_Form_Abstract_Validation_Rule
27
  */
28
  public function rule( $key, array $options = array() ) {
29
  $value = $this->Data->get( $key );
30
- if ( !empty( $value ) ) {
31
  $defaults = array(
32
  'message' => __( 'This is not the format of a zip code.', MWF_Config::DOMAIN )
33
  );
2
  /**
3
  * Name : MW WP Form Validation Rule Zip
4
  * Description: 値が郵便番号
5
+ * Version : 1.1.1
6
  * Author : Takashi Kitajima
7
  * Author URI : http://2inc.org
8
  * Created : July 21, 2014
9
+ * Modified : January 17, 2015
10
  * License : GPLv2
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
27
  */
28
  public function rule( $key, array $options = array() ) {
29
  $value = $this->Data->get( $key );
30
+ if ( !is_null( $value ) && !MWF_Functions::is_empty( $value ) ) {
31
  $defaults = array(
32
  'message' => __( 'This is not the format of a zip code.', MWF_Config::DOMAIN )
33
  );
mw-wp-form.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://plugins.2inc.org/mw-wp-form/
5
  * Description: MW WP Form is shortcode base contact form plugin. This plugin have many feature. For example you can use many validation rules, contact data saving, and chart aggregation using saved contact data.
6
- * Version: 2.2.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: January 14, 2015
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPLv2
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://plugins.2inc.org/mw-wp-form/
5
  * Description: MW WP Form is shortcode base contact form plugin. This plugin have many feature. For example you can use many validation rules, contact data saving, and chart aggregation using saved contact data.
6
+ * Version: 2.2.2
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: January 16, 2015
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPLv2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
5
  Requires at least: 3.7
6
  Tested up to: 4.1
7
- Stable tag: 2.2.1
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -71,6 +71,11 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
71
 
72
  == Changelog ==
73
 
 
 
 
 
 
74
  = 2.2.1 =
75
  * Bug fix : Fixed a bug that remove_query_vars_from_post() is not executed.
76
  * Bug fix : Fixed a akismet feature bug.
4
  Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
5
  Requires at least: 3.7
6
  Tested up to: 4.1
7
+ Stable tag: 2.2.2
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
71
 
72
  == Changelog ==
73
 
74
+ = 2.2.2 =
75
+ * Bug fix : Fixed a tel validation bug.
76
+ * Bug fix : Fixed a zip validation bug.
77
+ * Bug fix : Fixed a in validation bug.
78
+
79
  = 2.2.1 =
80
  * Bug fix : Fixed a bug that remove_query_vars_from_post() is not executed.
81
  * Bug fix : Fixed a akismet feature bug.