Add a validation for title and name