title: How to make a dropdown box & description box validate field?
body: <p>I'm using Dokan plugin for my website. I need to validate the dropdown box &amp; description box of my website. I used some code to validate product name, price, item code it's working fine (check <a href="https://i.stack.imgur.com/uGRP0.png" rel="nofollow noreferrer">screenshot 2</a>). If you check screenshot 2 you will see when I do not select the values in the product categories dropdown it will show an error message (error &amp; dropdown came from Dokan plugin). I need to make my dropdown like that. I added the location dropdown box by hard code in PHP. I cannot find a method to validate these dropdown &amp; description box (check <a href="https://i.stack.imgur.com/ephky.png" rel="nofollow noreferrer">screenshot 1</a>).</p>
  <p>This is the code I use to validate my other fields, in child theme/funtion.php</p>
  <pre><code> function dokan_can_add_product_validation_customized( $errors ) {
   $postdata = wp_unslash( $_POST );
  
  
  
  $featured_image = absint( sanitize_text_field( $postdata['feat_image_id'] ) );
    $_regular_price = absint( sanitize_text_field( $postdata['_regular_price'] ) );
    $item_code= absint( sanitize_text_field( $postdata['item_code'] ) );
  
    
  $phone_number= absint( sanitize_text_field( $postdata['phone_number'] ) );
  
    if ( empty( $featured_image ) &amp;&amp; ! in_array( 'Please upload a product cover image' , $errors ) ) {
        $errors[] = 'Please upload a product cover image';
    }
    if ( empty( $_regular_price ) &amp;&amp; ! in_array( 'Please insert product price' , $errors ) ) {
        $errors[] = 'Please insert product price';
    }
    if ( empty( $item_code) &amp;&amp; ! in_array( 'Please insert item code' , $errors ) ) {
        $errors[] = 'Please insert item code';
    }
  
   if ( empty( $phone_number) &amp;&amp; ! in_array( 'Please insert contact number' , $errors ) ) {
        $errors[] = 'Please insert contact number';
    }
  
  
    return $errors;
  }
  add_filter( 'dokan_can_add_product', 'dokan_can_add_product_validation_customized', 35, 1 );
  add_filter( 'dokan_can_edit_product', 'dokan_can_add_product_validation_customized', 35, 1 );
  function dokan_new_product_popup_validation_customized( $errors, $data ) {
    if ( ! $data['_regular_price'] ) {
      return new WP_Error( 'no-price', __( 'Please insert product price', 'dokan-lite' ) );
    }
    if ( ! $data['phone_number'] ) {
      return new WP_Error( 'no-price', __( 'Please insert Please insert contact number', 'dokan-lite' ) );
    }
   if ( ! $data['item_code'] ) {
      return new WP_Error( 'no-price', __( 'Please insert item code', 'dokan-lite' ) );
    }
   
  
    if ( ! $data['feat_image_id'] ) {
      return new WP_Error( 'no-image', __( 'Please select AT LEAST ONE Picture', 'dokan-lite' ) );
    }
  }
  add_filter( 'dokan_new_product_popup_args', 'dokan_new_product_popup_validation_customized', 35, 2 );
  </code></pre>