'id' => 'gallery_upload',
'name' => esc_html__( 'Image Upload', 'your-prefix' ),
'type' => 'image_upload',
'admin_columns' => 'before title',
'required' => true,
// Delete image from Media Library when remove it from post meta?
// Note: it might affect other posts if you use same image for multiple posts
'force_delete' => true,
// Maximum image uploads
'max_file_uploads' => 5,
// Display the "Uploaded 1/2 files" status
'max_status' => true,
This problem is expected behavior because the validation module doesn't support image_upload. The fields image_upload, image_advanced works differently from other fields since they use the Media Library and thus, the validation can't inject into the process.