Unfortunately also not working (same error-message / red field) - please can you show an example of how it works in the graphical UI?
As no pictures are possible to add, I can not show the result - only describe it...
I am doing it in "Taxonomies = category".
Copde generated:
<?php
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
function your_prefix_register_meta_boxes( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = [
'title' => esc_html__( 'Category_Order', 'text-domain' ),
'id' => 'Category_order',
'fields' => [
[
'id' => $prefix . 'M_category-orderID',
'type' => 'number',
'name' => esc_html__( 'Category Order ID', 'text-domain' ),
'required' => 1,
'tooltip' => 'defines order priority',
'admin_columns' => [
'position' => 'before name',
'sort' => true,
],
],
[
'id' => $prefix . 'text_sb532j9yqc',
'type' => 'text',
'name' => esc_html__( 'Text Field', 'text-domain' ),
'pattern' => '[0-9]{3}-[0-9]{3}-[0-9]{3}',
],
],
'taxonomies' => ['category'],
];
return $meta_boxes;
}