classes/controllers/FrmFieldsController.php 1 location
|
@@ 727-729 (lines=3) @@
|
724 |
|
} |
725 |
|
|
726 |
|
public static function check_label( $opt ) { |
727 |
|
if ( is_array($opt) ) { |
728 |
|
$opt = (isset($opt['label']) ? $opt['label'] : reset($opt)); |
729 |
|
} |
730 |
|
|
731 |
|
return $opt; |
732 |
|
} |
classes/models/FrmEntryValidate.php 1 location
|
@@ 71-73 (lines=3) @@
|
68 |
|
self::maybe_clear_value_for_default_blank_setting( $posted_field, $value ); |
69 |
|
|
70 |
|
// Reset arrays with only one value if it's not a field where array keys need to be preserved |
71 |
|
if ( is_array($value) && count( $value ) == 1 && isset( $value[0] ) ) { |
72 |
|
$value = reset($value); |
73 |
|
} |
74 |
|
|
75 |
|
if ( $posted_field->required == '1' && ! is_array( $value ) && trim( $value ) == '' ) { |
76 |
|
$errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'blank' ); |