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("yaml") final String correctText = "withPattern: 1234-11-11"; final String wrongText = "withPattern: <warning descr=\"Schema validation: String violates the pattern: '^\\d{4}\\-(0?[1-9]|1[012])\\-(0?[1-9]|[12][0-9]|3[01])$'\">wrong</warning>\n"; doTest(schema, correctText); doTest(schema, wrongText); }