Validates strings as commit messages