Added length validation for title