Code Duplication    Length = 3-3 lines in 2 locations

classes/models/FrmEntryValidate.php 2 locations

@@ 131-133 (lines=3) @@
128
			return;
129
		}
130
131
		if ( ! is_numeric( $value) ) {
132
			$errors[ 'field' . $field->temp_id ] = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
133
		}
134
135
		// validate number settings
136
		if ( $value != '' ) {
@@ 157-159 (lines=3) @@
154
155
		$pattern = self::phone_format( $field );
156
157
		if ( ! preg_match( $pattern, $value ) ) {
158
			$errors[ 'field' . $field->temp_id ] = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
159
		}
160
	}
161
162
	public static function phone_format( $field ) {