add validation to Note schema and include test for validation