void () { @Language("JSON") final String schema = """ { "properties": { "withPattern": { "pattern": "^\\\\d{4}\\\\-(0?[1-9]|1[012])\\\\-(0?[1-9]|[12][0-9]|3[01])$" } } }"""; @Language("JSON") final String correctText = """ { "withPattern": "1234-11-11" }"""; final String wrongText = """ { "withPattern": <warning descr="String violates the pattern: '^\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01])$'">"wrong"</warning> }"""; doTest(schema, correctText); doTest(schema, wrongText); }