Add length and presence validation to todo list title
Refactored tests for validation.