WP_Error with multiple form validation message

Updating this for people who might have the same issue.

//save the new post and return its ID
$post_id = wp_insert_post($new_post);

// This will redirect you to the newly created post (Using GUID)
$post = get_post($post_id);
wp_redirect($post->guid);
exit();

Change above code to below code will solve the issue.

$errors = write_here_errors()->get_error_messages();

// only create post if there are no errors
if(empty($errors)) {
    //save the new post and return its ID
    $post_id = wp_insert_post($new_post);

    if($post_id) {
        // This will redirect you to the newly created post (Using GUID)
        $post = get_post($post_id);
        wp_redirect($post->guid);
        exit();
    }
}