Skip to content

Commit

Permalink
fix #145
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Sep 8, 2023
1 parent 7930965 commit 4dae8bb
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion classes/validation-rules/class.alpha.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Alphabet', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Alphabet', 'mw-wp-form' ); ?></label>
<?php
}
}
2 changes: 1 addition & 1 deletion classes/validation-rules/class.alphanumeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Alphabet and Numeric', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Alphabet and Numeric', 'mw-wp-form' ); ?></label>
<?php
}
}
14 changes: 7 additions & 7 deletions classes/validation-rules/class.between.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,22 @@ public function rule( $name, array $options = array() ) {
public function admin( $key, $value ) {
$min = '';
$max = '';
if ( is_array( $value[ $this->getName() ] ) ) {
if ( isset( $value[ $this->getName() ]['min'] ) ) {
$min = $value[ $this->getName() ]['min'];
if ( is_array( $value[ $this->get_name() ] ) ) {
if ( isset( $value[ $this->get_name() ]['min'] ) ) {
$min = $value[ $this->get_name() ]['min'];
}
if ( isset( $value[ $this->getName() ]['max'] ) ) {
$max = $value[ $this->getName() ]['max'];
if ( isset( $value[ $this->get_name() ]['max'] ) ) {
$max = $value[ $this->get_name() ]['max'];
}
}
?>
<table>
<tr>
<td><?php esc_html_e( 'The range of the number of characters', 'mw-wp-form' ); ?></td>
<td>
<input type="text" value="<?php echo esc_attr( $min ); ?>" size="3" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][min]" />
<input type="text" value="<?php echo esc_attr( $min ); ?>" size="3" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][min]" />
<input type="text" value="<?php echo esc_attr( $max ); ?>" size="3" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][max]" />
<input type="text" value="<?php echo esc_attr( $max ); ?>" size="3" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][max]" />
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion classes/validation-rules/class.date.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function convert_jpdate_to_timestamp( $jpdate ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Date', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Date', 'mw-wp-form' ); ?></label>
<?php
}
}
6 changes: 3 additions & 3 deletions classes/validation-rules/class.eq.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
$target = '';
if ( is_array( $value[ $this->getName() ] ) && isset( $value[ $this->getName() ]['target'] ) ) {
$target = $value[ $this->getName() ]['target'];
if ( is_array( $value[ $this->get_name() ] ) && isset( $value[ $this->get_name() ]['target'] ) ) {
$target = $value[ $this->get_name() ]['target'];
}
?>
<table>
<tr>
<td><?php esc_html_e( 'The key at same value', 'mw-wp-form' ); ?></td>
<td><input type="text" value="<?php echo esc_attr( $target ); ?>" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][target]" /></td>
<td><input type="text" value="<?php echo esc_attr( $target ); ?>" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][target]" /></td>
</tr>
</table>
<?php
Expand Down
6 changes: 3 additions & 3 deletions classes/validation-rules/class.filesize.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ protected function _filesize_validate( $byte, $options ) {
*/
public function admin( $key, $value ) {
$bytes = '';
if ( is_array( $value[ $this->getName() ] ) && isset( $value[ $this->getName() ]['bytes'] ) ) {
$bytes = $value[ $this->getName() ]['bytes'];
if ( is_array( $value[ $this->get_name() ] ) && isset( $value[ $this->get_name() ]['bytes'] ) ) {
$bytes = $value[ $this->get_name() ]['bytes'];
}
?>
<table>
<tr>
<td><?php esc_html_e( 'Permitted file size', 'mw-wp-form' ); ?></td>
<td><input type="text" value="<?php echo esc_attr( $bytes ); ?>" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][bytes]" /> <span class="mwf_note"><?php esc_html_e( 'bytes', 'mw-wp-form' ); ?></span></td>
<td><input type="text" value="<?php echo esc_attr( $bytes ); ?>" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][bytes]" /> <span class="mwf_note"><?php esc_html_e( 'bytes', 'mw-wp-form' ); ?></span></td>
</tr>
</table>
<?php
Expand Down
6 changes: 3 additions & 3 deletions classes/validation-rules/class.filetype.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
$types = '';
if ( is_array( $value[ $this->getName() ] ) && isset( $value[ $this->getName() ]['types'] ) ) {
$types = $value[ $this->getName() ]['types'];
if ( is_array( $value[ $this->get_name() ] ) && isset( $value[ $this->get_name() ]['types'] ) ) {
$types = $value[ $this->get_name() ]['types'];
}
?>
<table>
<tr>
<td><?php esc_html_e( 'Permitted Extension', 'mw-wp-form' ); ?></td>
<td><input type="text" value="<?php echo esc_attr( $types ); ?>" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][types]" /> <span class="mwf_note"><?php esc_html_e( 'Example:jpg or jpg,txt,…', 'mw-wp-form' ); ?></span></td>
<td><input type="text" value="<?php echo esc_attr( $types ); ?>" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][types]" /> <span class="mwf_note"><?php esc_html_e( 'Example:jpg or jpg,txt,…', 'mw-wp-form' ); ?></span></td>
</tr>
</table>
<?php
Expand Down
2 changes: 1 addition & 1 deletion classes/validation-rules/class.hiragana.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Japanese Hiragana', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Japanese Hiragana', 'mw-wp-form' ); ?></label>
<?php
}
}
2 changes: 1 addition & 1 deletion classes/validation-rules/class.kana.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Japanese Hiragana or Katakana', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Japanese Hiragana or Katakana', 'mw-wp-form' ); ?></label>
<?php
}
}
2 changes: 1 addition & 1 deletion classes/validation-rules/class.katakana.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Japanese Katakana', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Japanese Katakana', 'mw-wp-form' ); ?></label>
<?php
}
}
2 changes: 1 addition & 1 deletion classes/validation-rules/class.mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'E-mail', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'E-mail', 'mw-wp-form' ); ?></label>
<?php
}
}
14 changes: 7 additions & 7 deletions classes/validation-rules/class.maximagesize.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,22 @@ public function rule( $name, array $options = array() ) {
public function admin( $key, $value ) {
$width = '';
$height = '';
if ( is_array( $value[ $this->getName() ] ) ) {
if ( isset( $value[ $this->getName() ]['width'] ) ) {
$width = $value[ $this->getName() ]['width'];
if ( is_array( $value[ $this->get_name() ] ) ) {
if ( isset( $value[ $this->get_name() ]['width'] ) ) {
$width = $value[ $this->get_name() ]['width'];
}
if ( isset( $value[ $this->getName() ]['height'] ) ) {
$height = $value[ $this->getName() ]['height'];
if ( isset( $value[ $this->get_name() ]['height'] ) ) {
$height = $value[ $this->get_name() ]['height'];
}
}
?>
<table>
<tr>
<td><?php esc_html_e( 'Maximum image size', 'mw-wp-form' ); ?></td>
<td>
<input type="text" value="<?php echo esc_attr( $width ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][width]" />
<input type="text" value="<?php echo esc_attr( $width ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][width]" />
&times;
<input type="text" value="<?php echo esc_attr( $height ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][height]" />
<input type="text" value="<?php echo esc_attr( $height ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][height]" />
</td>
</tr>
</table>
Expand Down
14 changes: 7 additions & 7 deletions classes/validation-rules/class.minimagesize.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,22 @@ public function rule( $name, array $options = array() ) {
public function admin( $key, $value ) {
$width = '';
$height = '';
if ( is_array( $value[ $this->getName() ] ) ) {
if ( isset( $value[ $this->getName() ]['width'] ) ) {
$width = $value[ $this->getName() ]['width'];
if ( is_array( $value[ $this->get_name() ] ) ) {
if ( isset( $value[ $this->get_name() ]['width'] ) ) {
$width = $value[ $this->get_name() ]['width'];
}
if ( isset( $value[ $this->getName() ]['height'] ) ) {
$height = $value[ $this->getName() ]['height'];
if ( isset( $value[ $this->get_name() ]['height'] ) ) {
$height = $value[ $this->get_name() ]['height'];
}
}
?>
<table>
<tr>
<td><?php esc_html_e( 'Minimum image size', 'mw-wp-form' ); ?></td>
<td>
<input type="text" value="<?php echo esc_attr( $width ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][width]" />
<input type="text" value="<?php echo esc_attr( $width ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][width]" />
&times;
<input type="text" value="<?php echo esc_attr( $height ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][height]" />
<input type="text" value="<?php echo esc_attr( $height ); ?>" size="4" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][height]" />
</td>
</tr>
</table>
Expand Down
6 changes: 3 additions & 3 deletions classes/validation-rules/class.minlength.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
$min = '';
if ( is_array( $value[ $this->getName() ] ) && isset( $value[ $this->getName() ]['min'] ) ) {
$min = $value[ $this->getName() ]['min'];
if ( is_array( $value[ $this->get_name() ] ) && isset( $value[ $this->get_name() ]['min'] ) ) {
$min = $value[ $this->get_name() ]['min'];
}
?>
<table>
<tr>
<td><?php esc_html_e( 'The number of the minimum characters', 'mw-wp-form' ); ?></td>
<td><input type="text" value="<?php echo esc_attr( $min ); ?>" size="3" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>][min]" /></td>
<td><input type="text" value="<?php echo esc_attr( $min ); ?>" size="3" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>][min]" /></td>
</tr>
</table>
<?php
Expand Down
2 changes: 1 addition & 1 deletion classes/validation-rules/class.month.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function convert_jpdate_to_timestamp( $jpdate ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Date(Year/Month)', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Date(Year/Month)', 'mw-wp-form' ); ?></label>
<?php
}
}
2 changes: 1 addition & 1 deletion classes/validation-rules/class.noempty.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'No empty', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'No empty', 'mw-wp-form' ); ?></label>
<?php
}
}
2 changes: 1 addition & 1 deletion classes/validation-rules/class.numeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Numeric', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Numeric', 'mw-wp-form' ); ?></label>
<?php
}
}
2 changes: 1 addition & 1 deletion classes/validation-rules/class.required.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'No empty( with checkbox )', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'No empty( with checkbox )', 'mw-wp-form' ); ?></label>
<?php
}
}
4 changes: 2 additions & 2 deletions classes/validation-rules/class.tel.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Tel', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Tel', 'mw-wp-form' ); ?></label>
<?php
}

Expand All @@ -74,7 +74,7 @@ public function _mwform_validation_rules( array $validation_rules ) {
return $validation_rules;
}

$validation_rules[ $this->getName() ] = '';
$validation_rules[ $this->get_name() ] = '';
return $validation_rules;
}
}
2 changes: 1 addition & 1 deletion classes/validation-rules/class.url.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php echo esc_html_x( 'URL', 'validatioin', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php echo esc_html_x( 'URL', 'validatioin', 'mw-wp-form' ); ?></label>
<?php
}
}
4 changes: 2 additions & 2 deletions classes/validation-rules/class.zip.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function rule( $name, array $options = array() ) {
*/
public function admin( $key, $value ) {
?>
<label><input type="checkbox" <?php checked( $value[ $this->getName() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->getName() ); ?>]" value="1" /><?php esc_html_e( 'Zip Code', 'mw-wp-form' ); ?></label>
<label><input type="checkbox" <?php checked( $value[ $this->get_name() ], 1 ); ?> name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][<?php echo esc_attr( $this->get_name() ); ?>]" value="1" /><?php esc_html_e( 'Zip Code', 'mw-wp-form' ); ?></label>
<?php
}

Expand All @@ -69,7 +69,7 @@ public function _mwform_validation_rules( array $validation_rules ) {
return $validation_rules;
}

$validation_rules[ $this->getName() ] = '';
$validation_rules[ $this->get_name() ] = '';
return $validation_rules;
}
}

0 comments on commit 4dae8bb

Please sign in to comment.