--- src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java.orig	2009-07-05 21:14:19.000000000 +1000
+++ src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java	2009-07-05 21:24:35.000000000 +1000
@@ -78,6 +78,7 @@
     protected static ArrayList<String> ignoreDataEquals = new ArrayList<String>();
     protected static ArrayList<String> ignoreDataEndsWith = new ArrayList<String>();
     protected static ArrayList<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>();
+    protected static ArrayList<IgnoreTwoKeyPair> ignoreDataTwoKeyPair = new ArrayList<IgnoreTwoKeyPair>();
 
     /** The preferences prefix */
     protected static final String PREFIX = PreferenceEditor.PREFIX + "." + TagChecker.class.getSimpleName();
@@ -252,6 +253,19 @@
                             tmp.value = line.substring(mid+1);
                             ignoreDataKeyPair.add(tmp);
                         }
+                        else if(key.equals("T:"))
+                        {
+                            IgnoreTwoKeyPair tmp = new IgnoreTwoKeyPair();
+                            int mid = line.indexOf("=");
+                            int split = line.indexOf("|");
+                            tmp.key1 = line.substring(0, mid);
+                            tmp.value1 = line.substring(mid+1, split);
+                            line = line.substring(split+1);
+                            mid = line.indexOf("=");
+                            tmp.key2 = line.substring(0, mid);
+                            tmp.value2 = line.substring(mid+1);
+                            ignoreDataTwoKeyPair.add(tmp);
+                        }
                         continue;
                     }
                     else if(tagcheckerfile)
@@ -374,6 +388,46 @@
 
         if(checkComplex)
         {
+            Map<String, String> props = (p.keys == null) ? Collections.<String, String>emptyMap() : p.keys;
+            for(Entry<String, String> prop: props.entrySet() )
+            {
+                boolean ignore = true;
+                String key1 = prop.getKey();
+                String value1 = prop.getValue();
+
+                for(IgnoreTwoKeyPair a : ignoreDataTwoKeyPair)
+                {
+                    if(key1.equals(a.key1) && value1.equals(a.value1))
+                    {
+                        ignore = false;
+                        for(Entry<String, String> prop2: props.entrySet() )
+                        {
+                            String key2 = prop2.getKey();
+                            String value2 = prop2.getValue();
+                            for(IgnoreTwoKeyPair b : ignoreDataTwoKeyPair)
+                            {
+                                if(key2.equals(b.key2) && value2.equals(b.value2))
+                                {
+                                    ignore = true;
+                                    break;
+                                }
+                            }
+                            if(ignore)
+                                break;
+                        }
+                    }
+                    if(ignore)
+                        break;
+                }
+
+                if(!ignore)
+                {
+                    errors.add( new TestError(this, Severity.ERROR, tr("Illegal tag/value combinations"),
+                    tr("Illegal tag/value combinations"), tr("Illegal tag/value combinations"), 1272, p) );
+                    withErrors.add(p, "TC");
+                }
+            }
+
             for(CheckerData d : checkerData)
             {
                 if(d.match(p))
@@ -471,6 +525,12 @@
                             ignore = true;
                     }
 
+                    for(IgnoreTwoKeyPair a : ignoreDataTwoKeyPair)
+                    {
+                        if(key.equals(a.key2) && value.equals(a.value2))
+                            ignore = true;
+                    }
+
                     if(!ignore)
                     {
                         String i = marktr("Value ''{0}'' for key ''{1}'' not in presets.");
@@ -777,6 +837,13 @@
         return false;
     }
 
+    private static class IgnoreTwoKeyPair {
+        public String key1;
+        public String value1;
+        public String key2;
+        public String value2;
+    }
+
     private static class IgnoreKeyPair {
         public String key;
         public String value;
