summaryrefslogtreecommitdiff
path: root/tests/files/fail/test_pattern.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/files/fail/test_pattern.yaml')
-rw-r--r--tests/files/fail/test_pattern.yaml26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/files/fail/test_pattern.yaml b/tests/files/fail/test_pattern.yaml
new file mode 100644
index 0000000..4531d55
--- /dev/null
+++ b/tests/files/fail/test_pattern.yaml
@@ -0,0 +1,26 @@
+---
+name: fail-pattern-1
+desc:
+data:
+ email: foo(at)mail.com
+schema:
+ type: map
+ mapping:
+ email:
+ type: str
+ pattern: .+@.+
+errors:
+ - "Value 'foo(at)mail.com' does not match pattern '.+@.+'. Path: '/email'"
+---
+name: fail-pattern-2
+desc:
+data:
+ d: 'a'
+schema:
+ type: map
+ mapping:
+ d:
+ type: str
+ pattern: '[0-9]+'
+errors:
+ - "Value 'a' does not match pattern '[0-9]+'. Path: '/d'"