add validation to metadata