Added validation and unit test for title length