Code Duplication    Length = 9-10 lines in 2 locations

classes/models/FrmEntryValidate.php 2 locations

@@ 147-155 (lines=9) @@
144
		self::validate_field_types( $errors, $field, $value, $args );
145
	}
146
147
	public static function validate_email_field( &$errors, $field, $value, $args ) {
148
		_deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
149
150
		if ( $field->type != 'email' ) {
151
			return;
152
		}
153
154
		self::validate_field_types( $errors, $field, $value, $args );
155
	}
156
157
	public static function validate_number_field( &$errors, $field, $value, $args ) {
158
		_deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
@@ 157-166 (lines=10) @@
154
		self::validate_field_types( $errors, $field, $value, $args );
155
	}
156
157
	public static function validate_number_field( &$errors, $field, $value, $args ) {
158
		_deprecated_function( __FUNCTION__, '3.0', 'FrmFieldType::validate' );
159
160
		//validate the number format
161
		if ( $field->type != 'number' ) {
162
			return;
163
		}
164
165
		self::validate_field_types( $errors, $field, $value, $args );
166
	}
167
168
	public static function validate_phone_field( &$errors, $field, $value, $args ) {
169
		if ( $field->type == 'phone' || ( $field->type == 'text' && FrmField::is_option_true_in_object( $field, 'format' ) ) ) {