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