Data Validation issues have been found in your theme

wordpress

#1

hi all

i got the second soft reject because of the data validation
i just wanted to know how to validate to following piece of code ?

if ( function_exists( 'the_post_thumbnail' ) && has_post_thumbnail() ) {
					$bg       = get_the_post_thumbnail_url( get_the_ID(), 'inlife-img-1600x800' );
					$bg_style = ' style="background-image : url(' . $bg . ')"';
				}
				?>
				<div class="main-item"<?php echo $bg_style; ?>>

i want to validate <?php echo $bg_style; ?>

any help will be appreciated