Length validation for title and test