@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | // Validate the number format. |
64 | 64 | if ( ! is_numeric( $args['value'] ) && '' !== $args['value'] ) { |
65 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
65 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | if ( $args['value'] === '' ) { |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | $maxnum = FrmField::get_option( $this->field, 'maxnum' ); |
75 | 75 | |
76 | 76 | if ( $minnum !== '' && $value < $minnum ) { |
77 | - $errors[ 'field' . $args['id'] ] = __( 'Please select a higher number', 'formidable' ); |
|
77 | + $errors['field' . $args['id']] = __( 'Please select a higher number', 'formidable' ); |
|
78 | 78 | } elseif ( $maxnum !== '' && $value > $maxnum ) { |
79 | - $errors[ 'field' . $args['id'] ] = __( 'Please select a lower number', 'formidable' ); |
|
79 | + $errors['field' . $args['id']] = __( 'Please select a lower number', 'formidable' ); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | $this->validate_step( $errors, $args ); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * @return void |
96 | 96 | */ |
97 | 97 | protected function validate_step( &$errors, $args ) { |
98 | - if ( isset( $errors[ 'field' . $args['id'] ] ) ) { |
|
98 | + if ( isset( $errors['field' . $args['id']] ) ) { |
|
99 | 99 | // Don't need to check if value is invalid before. |
100 | 100 | return; |
101 | 101 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | return; |
111 | 111 | } |
112 | 112 | |
113 | - $errors[ 'field' . $args['id'] ] = sprintf( |
|
113 | + $errors['field' . $args['id']] = sprintf( |
|
114 | 114 | // Translators: %1$s: the first nearest value; %2$s: the second nearest value. |
115 | 115 | __( 'Please enter a valid value. Two nearest valid values are %1$s and %2$s', 'formidable' ), |
116 | 116 | is_numeric( $result[0] ) ? floatval( $result[0] ) : $result[0], |