diff --git a/.travis.yml b/.travis.yml
index 896f07d..52cda7e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,10 +1,12 @@
 sudo: false
 language: python
 python:
+  - "2.6"
   - "2.7"
   - "3.3"
   - "3.4"
   - "3.5"
+  - "3.6"
 install:
   - pip install -U pip setuptools
   - pip install tox-travis
diff --git a/stix2patterns/validator.py b/stix2patterns/validator.py
index b1563d9..79313c0 100644
--- a/stix2patterns/validator.py
+++ b/stix2patterns/validator.py
@@ -35,9 +35,15 @@ def run_validator(pattern):
     returned in a list.  The test passed if the returned list is empty.
     '''
 
+    start = ''
     if isinstance(pattern, six.string_types):
+        start = pattern[:2]
         pattern = InputStream(pattern)
 
+    if not start:
+        start = pattern.readline()[:2]
+        pattern.seek(0)
+
     parseErrListener = STIXPatternErrorListener()
 
     lexer = STIXPatternLexer(pattern)
@@ -54,6 +60,11 @@ def run_validator(pattern):
 
     parser.pattern()
 
+    # replace with easier-to-understand error message
+    if not (start[0] == '[' or start == '(['):
+        parseErrListener.err_strings[0] = "FAIL: Error found at line 1:0. " \
+                                          "input is missing square brackets"
+
     return parseErrListener.err_strings
 
 
diff --git a/tox.ini b/tox.ini
index c40db2f..164fcf3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py27,py33,py34,py35,pycodestyle
+envlist = py26,py27,py33,py34,py35,py36,pycodestyle
 
 [testenv]
 deps = pytest
@@ -16,7 +16,9 @@ exclude=grammars
 
 [travis]
 python =
+  2.6: py26
   2.7: py27, pycodestyle
   3.3: py33
   3.4: py34
   3.5: py35
+  3.6: py36

Unclear error message when missing brackets
If the input is missing the surrounding '[' and ']' (ie. the input is just a Comparison Expression, not an Observation Expression or Pattern Expresion), the validator's error message is unhelpful:

    $ validate_patterns
    Enter a pattern to validate: file-object:hashes.md5 = '79054025255fb1a26e4bc422aef54eb4'
    FAIL: Error found at line 1:0. no viable alternative at input 'file-object' 

This message comes from the ANTLR library so it can't easily be changed, but perhaps the validator could check if the input starts with '[' or '([' and print a more user-friendly error message?
diff --git a/stix2patterns/test/test_validator.py b/stix2patterns/test/test_validator.py
index 626b981..814517f 100644
--- a/stix2patterns/test/test_validator.py
+++ b/stix2patterns/test/test_validator.py
@@ -2,7 +2,6 @@
 Test cases for stix2patterns/validator.py.
 '''
 import os
-
 import pytest
 
 from stix2patterns.validator import validate
@@ -22,21 +21,33 @@ def test_spec_patterns(test_input):
 
 
 FAIL_CASES = [
-    "file:size = 1280",  # Does not use square brackets
-    "[file:hashes.MD5 = cead3f77f6cda6ec00f57d76c9a6879f]"  # No quotes around string
-    "[file.size = 1280]",  # Use period instead of colon
-    "[file:name MATCHES /.*\\.dll/]",  # Quotes around regular expression
-    "[win-registry-key:key = 'hkey_local_machine\\\\foo\\\\bar'] WITHIN 5 HOURS",  # SECONDS is the only valid time unit
+    ("file:size = 1280",  # Does not use square brackets
+        "FAIL: Error found at line 1:0. input is missing square brackets"),
+    ("[file:size = ]",  # Missing value
+        "FAIL: Error found at line 1:13. no viable alternative at input ']'"),
+    ("[file:hashes.MD5 = cead3f77f6cda6ec00f57d76c9a6879f]",  # No quotes around string
+        "FAIL: Error found at line 1:19. no viable alternative at input 'cead3f77f6cda6ec00f57d76c9a6879f'"),
+    ("[file.size = 1280]",  # Use period instead of colon
+        "FAIL: Error found at line 1:5. no viable alternative at input 'file.'"),
+    ("[file:name MATCHES /.*\\.dll/]",  # Quotes around regular expression
+        "FAIL: Error found at line 1:19. mismatched input '/' expecting <INVALID>"),
+    ("[win-registry-key:key = 'hkey_local_machine\\\\foo\\\\bar'] WITHIN ]",  # Missing Qualifier value
+        "FAIL: Error found at line 1:63. mismatched input ']' expecting {<INVALID>, <INVALID>}"),
+    ("[win-registry-key:key = 'hkey_local_machine\\\\foo\\\\bar'] WITHIN 5 HOURS]",  # SECONDS is the only valid time unit
+        "FAIL: Error found at line 1:65. mismatched input 'HOURS' expecting <INVALID>"),
+    ("[network-traffic:dst_ref.value ISSUBSET ]",  # Missing second Comparison operand
+        "FAIL: Error found at line 1:40. missing <INVALID> at ']'"),
     # TODO: add more failing test cases.
 ]
 
 
-@pytest.mark.parametrize("test_input", FAIL_CASES)
-def test_fail_patterns(test_input):
+@pytest.mark.parametrize("test_input,test_output", FAIL_CASES)
+def test_fail_patterns(test_input, test_output):
     '''
     Validate that patterns fail as expected.
     '''
-    pass_test = validate(test_input, print_errs=True)
+    pass_test, errors = validate(test_input, ret_errs=True, print_errs=True)
+    assert errors[0] == test_output
     assert pass_test is False
 
 

pip install -e .[dev]
parse_log_pytest
pytest
pytest pytest-cov flake8
apt-get update apt-get install -y gcc
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
antlr4-python3-runtime==4.5.3
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
coverage==6.2
flake8==5.0.4
importlib-metadata==4.2.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
mccabe==0.7.0
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pycodestyle==2.9.1
pyflakes==2.5.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
pytest-cov==4.0.0
six==1.17.0
-e git+https://github.com/oasis-open/cti-pattern-validator.git@82956eaff8caf5af323b0c712550bfc5840fbd62#egg=stix2_patterns
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==1.2.3
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: cti-pattern-validator
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - antlr4-python3-runtime==4.5.3
      - coverage==6.2
      - flake8==5.0.4
      - importlib-metadata==4.2.0
      - mccabe==0.7.0
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
      - pytest-cov==4.0.0
      - six==1.17.0
      - tomli==1.2.3
prefix: /opt/conda/envs/cti-pattern-validator

stix2patterns/test/test_validator.py::test_fail_patterns[file:size
stix2patterns/test/test_validator.py::test_spec_patterns[[file:hashes."SHA-256" stix2patterns/test/test_validator.py::test_spec_patterns[[email-message:from_ref.value stix2patterns/test/test_validator.py::test_spec_patterns[[file:hashes.MD5 stix2patterns/test/test_validator.py::test_spec_patterns[[user-account:account_type stix2patterns/test/test_validator.py::test_spec_patterns[[artifact:mime_type stix2patterns/test/test_validator.py::test_spec_patterns[[file:name stix2patterns/test/test_validator.py::test_spec_patterns[[file:extensions.windows-pebinary-ext.sections[*].entropy stix2patterns/test/test_validator.py::test_spec_patterns[[file:mime_type stix2patterns/test/test_validator.py::test_spec_patterns[[network-traffic:dst_ref.type stix2patterns/test/test_validator.py::test_spec_patterns[[domain-name:value stix2patterns/test/test_validator.py::test_spec_patterns[[url:value stix2patterns/test/test_validator.py::test_spec_patterns[[x509-certificate:issuer stix2patterns/test/test_validator.py::test_spec_patterns[[windows-registry-key:key stix2patterns/test/test_validator.py::test_spec_patterns[[(file:name stix2patterns/test/test_validator.py::test_spec_patterns[[email-message:sender_ref.value stix2patterns/test/test_validator.py::test_spec_patterns[[x-usb-device:usbdrive.serial_number stix2patterns/test/test_validator.py::test_spec_patterns[[process:command_line stix2patterns/test/test_validator.py::test_spec_patterns[[network-traffic:dst_ref.value stix2patterns/test/test_validator.py::test_spec_patterns[([file:name stix2patterns/test/test_validator.py::test_fail_patterns[[file:size stix2patterns/test/test_validator.py::test_fail_patterns[[file:hashes.MD5 stix2patterns/test/test_validator.py::test_fail_patterns[[file.size stix2patterns/test/test_validator.py::test_fail_patterns[[file:name stix2patterns/test/test_validator.py::test_fail_patterns[[win-registry-key:key stix2patterns/test/test_validator.py::test_fail_patterns[[network-traffic:dst_ref.value stix2patterns/test/test_validator.py::test_pass_patterns[[file:size stix2patterns/test/test_validator.py::test_pass_patterns[[file:file_name stix2patterns/test/test_validator.py::test_pass_patterns[[file:extended_properties.ntfs-ext.sid stix2patterns/test/test_validator.py::test_pass_patterns[[emailaddr:value stix2patterns/test/test_validator.py::test_pass_patterns[[ipv4addr:value stix2patterns/test/test_validator.py::test_pass_patterns[[user-account:value stix2patterns/test/test_validator.py::test_pass_patterns[[file:file_system_properties.file_name stix2patterns/test/test_validator.py::test_pass_patterns[[network-connection:extended_properties[0].source_payload stix2patterns/test/test_validator.py::test_pass_patterns[[win-registry-key:key
.travis.yml tox.ini stix2patterns/validator.py
.travis.yml tox.ini stix2patterns/validator.py