PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.10
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.10
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/fields/FrmFieldNumber.php +4 -8 6.36.10 View file →
@@ -14,13 +14,8 @@
14 14 */
15 15 protected $type = 'number';
16 16
17 17 /**
18 - * @var string
19 - */
20 - protected $display_type = 'text';
21 -
22 - /**
23 18 * @var bool
24 19 */
25 20 protected $array_allowed = false;
26 21
@@ -67,9 +62,9 @@
67 62 $errors = array();
68 63
69 64 $this->remove_commas_from_number( $args );
70 65
71 - //validate the number format
66 + // Validate the number format.
72 67 if ( ! is_numeric( $args['value'] ) && '' !== $args['value'] ) {
73 68 $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
74 69 }
75 70
@@ -105,9 +100,10 @@
105 100 * @return void
106 101 */
107 102 private function validate_step( &$errors, $args ) {
108 103 if ( isset( $errors[ 'field' . $args['id'] ] ) ) {
109 - return; // Don't need to check if value is invalid before.
104 + // Don't need to check if value is invalid before.
105 + return;
110 106 }
111 107
112 108 $step = FrmField::get_option( $this->field, 'step' );
113 109 if ( ! $step || ! is_numeric( $step ) ) {
@@ -133,9 +129,9 @@
133 129 * @since 5.2.07
134 130 *
135 131 * @param numeric $value The value.
136 132 * @param numeric $step The step.
137 - * @return int|array Return `0` if valid. Otherwise, return an array contains two nearest values.
133 + * @return array|int Return `0` if valid. Otherwise, return an array contains two nearest values.
138 134 */
139 135 private function check_value_is_valid_with_step( $value, $step ) {
140 136 // Count the number of decimals.
141 137 $decimals = max( FrmAppHelper::count_decimals( $value ), FrmAppHelper::count_decimals( $step ) );