I'm registering a field group for a CPT and can't have the pattern attribute working. No validation happens on the backend or frontend, Chrome or Firefox. I went back to the basics and created a new group with only one field following the example shown in the documentation and still does not work. Here's the code:
add_filter( 'rwmb_meta_boxes', 'nvf_register_mb_candidatura_form_input' );
function nvf_register_mb_candidatura_form_input( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = [
'title' => __( 'Input Formulário dev', 'nvf-gb-front' ),
'id' => 'candidatura-form-details-dev',
'post_types' => ['candidatura_bolsa'],
'fields' => [
[
'type' => 'text',
'id' => 'phone',
'name' => 'Phone number',
// Attributes for validation.
'required' => true, // Make the field required.
'pattern' => '[0-9]{9}', // Must have 9 digits
]
],
];
return $meta_boxes;
}
Any ideas of what can be going on?
Thanks in advance.
EDIT: I'm using MB AIO Version 1.14.3 and MB Version 5.4.6