added validations for the presence of the title and the text