Can you extend existing VARDEFS

I am trying to extend the var defs on on a an existing definition.

but when I try to do a repair and rebuild it fails



$dictionary['Note']['fields']['name'] = array_merge(
    $dictionary['Note']['fields']['name'],
    [
        'placeholderLabel' => 'LBL_PLACEHOLDER_NOTE_SUBJECT',
        'errors' => [
            'required' => 'LBL_NOTE_SUBJECT_REQUIRED',
            'length' => 'LBL_NOTE_SUBJECT_LENGTH',
        ],
    ]
);

is this not possible.

No idea, but try out this:

if (isset($dictionary['Note']['fields']['name']) && is_array($dictionary['Note']['fields']['name'])) {
    $dictionary['Note']['fields']['name']['placeholderLabel'] = 'LBL_PLACEHOLDER_NOTE_SUBJECT';
    $dictionary['Note']['fields']['name']['errors'] = [
        'required' => 'LBL_NOTE_SUBJECT_REQUIRED',
        'length' => 'LBL_NOTE_SUBJECT_LENGTH',
    ];
}

We are allowed to extend the vardefs. For more please refer, Extension Framework :: SuiteCRM Documentation

The above code should work by creating a new file vardefs.php in a directory custom\Extension\modules\Notes\Ext\Vardefs and add the key values like for example $dictionary['Note']['fields']['name']['required']=true;.

I think you want to have custom error messages while validating the inputs. For this you may refer