classes/models/FrmEntryValidate.php 1 location
|
@@ 82-84 (lines=3) @@
|
| 79 |
|
self::maybe_clear_value_for_default_blank_setting( $posted_field, $value ); |
| 80 |
|
|
| 81 |
|
// Reset arrays with only one value if it's not a field where array keys need to be preserved |
| 82 |
|
if ( is_array($value) && count( $value ) == 1 && isset( $value[0] ) ) { |
| 83 |
|
$value = reset($value); |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
if ( $posted_field->required == '1' && ! is_array( $value ) && trim( $value ) == '' ) { |
| 87 |
|
$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'blank' ); |
classes/controllers/FrmFieldsController.php 1 location
|
@@ 653-655 (lines=3) @@
|
| 650 |
|
} |
| 651 |
|
|
| 652 |
|
public static function check_label( $opt ) { |
| 653 |
|
if ( is_array($opt) ) { |
| 654 |
|
$opt = (isset($opt['label']) ? $opt['label'] : reset($opt)); |
| 655 |
|
} |
| 656 |
|
|
| 657 |
|
return $opt; |
| 658 |
|
} |