| 1 |
error: expected validate regex attribute item to be of the form `regex(...)` |
| 2 |
--> tests/ui/invalid_validation_attrs.rs:5:31 |
| 3 |
| |
| 4 |
5 | pub struct Struct1(#[validate(regex, foo, length(min = 1, equal = 2, bar))] String); |
| 5 |
| ^^^^^ |
| 6 |
|
| 7 |
error: expected schemars regex attribute item to be of the form `regex(...)` |
| 8 |
--> tests/ui/invalid_validation_attrs.rs:9:31 |
| 9 |
| |
| 10 |
9 | pub struct Struct2(#[schemars(regex, foo, length(min = 1, equal = 2, bar))] String); |
| 11 |
| ^^^^^ |
| 12 |
|
| 13 |
error: schemars attribute cannot contain both `equal` and `min` |
| 14 |
--> tests/ui/invalid_validation_attrs.rs:9:59 |
| 15 |
| |
| 16 |
9 | pub struct Struct2(#[schemars(regex, foo, length(min = 1, equal = 2, bar))] String); |
| 17 |
| ^^^^^^^^^ |
| 18 |
|
| 19 |
error: unknown item in schemars length attribute: `bar` |
| 20 |
--> tests/ui/invalid_validation_attrs.rs:9:70 |
| 21 |
| |
| 22 |
9 | pub struct Struct2(#[schemars(regex, foo, length(min = 1, equal = 2, bar))] String); |
| 23 |
| ^^^ |
| 24 |
|
| 25 |
error: unknown schemars attribute `foo` |
| 26 |
--> tests/ui/invalid_validation_attrs.rs:9:38 |
| 27 |
| |
| 28 |
9 | pub struct Struct2(#[schemars(regex, foo, length(min = 1, equal = 2, bar))] String); |
| 29 |
| ^^^ |
| 30 |
|
| 31 |
error: unknown schemars attribute `email` |
| 32 |
--> tests/ui/invalid_validation_attrs.rs:8:12 |
| 33 |
| |
| 34 |
8 | #[schemars(email)] |
| 35 |
| ^^^^^ |
| 36 |
|
| 37 |
error: expected validate regex attribute item to be of the form `regex(...)` |
| 38 |
--> tests/ui/invalid_validation_attrs.rs:14:9 |
| 39 |
| |
| 40 |
14 | regex = "foo", |
| 41 |
| ^^^^^^^^^^^^^ |
| 42 |
|
| 43 |
error: expected validate contains attribute item to be of the form `contains(...)` |
| 44 |
--> tests/ui/invalid_validation_attrs.rs:15:9 |
| 45 |
| |
| 46 |
15 | contains = "bar", |
| 47 |
| ^^^^^^^^^^^^^^^^ |
| 48 |
|
| 49 |
error: `pattern` is not supported in `validate(regex(...))` attribute - use either `validate(regex(path = ...))` or `schemars(regex(pattern = ...))` instead |
| 50 |
--> tests/ui/invalid_validation_attrs.rs:16:15 |
| 51 |
| |
| 52 |
16 | regex(pattern = "baz"), |
| 53 |
| ^^^^^^^^^^^^^^^ |
| 54 |
|
| 55 |
error: `validate(regex(...))` attribute requires `path = ...` |
| 56 |
--> tests/ui/invalid_validation_attrs.rs:16:9 |
| 57 |
| |
| 58 |
16 | regex(pattern = "baz"), |
| 59 |
| ^^^^^^^^^^^^^^^^^^^^^^ |
| 60 |
|
| 61 |
error: expected schemars regex attribute item to be of the form `regex(...)` |
| 62 |
--> tests/ui/invalid_validation_attrs.rs:28:9 |
| 63 |
| |
| 64 |
28 | regex = "foo", |
| 65 |
| ^^^^^^^^^^^^^ |
| 66 |
|
| 67 |
error: expected schemars contains attribute item to be of the form `contains(...)` |
| 68 |
--> tests/ui/invalid_validation_attrs.rs:29:9 |
| 69 |
| |
| 70 |
29 | contains = "bar", |
| 71 |
| ^^^^^^^^^^^^^^^^ |
| 72 |
|
| 73 |
error: `path` is not supported in `schemars(regex(...))` attribute - use `schemars(regex(pattern = ...))` instead |
| 74 |
--> tests/ui/invalid_validation_attrs.rs:30:15 |
| 75 |
| |
| 76 |
30 | regex(path = "baz"), |
| 77 |
| ^^^^^^^^^^^^ |
| 78 |
|
| 79 |
error: `schemars(regex(...))` attribute requires `pattern = ...` |
| 80 |
--> tests/ui/invalid_validation_attrs.rs:30:9 |
| 81 |
| |
| 82 |
30 | regex(path = "baz"), |
| 83 |
| ^^^^^^^^^^^^^^^^^^^ |
| 84 |
|
| 85 |
error: unexpected value of schemars email attribute item |
| 86 |
--> tests/ui/invalid_validation_attrs.rs:33:14 |
| 87 |
| |
| 88 |
33 | email(code = "code_str", message = "message"), |
| 89 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 90 |
|
| 91 |
error: unexpected value of schemars email attribute item |
| 92 |
--> tests/ui/invalid_validation_attrs.rs:34:15 |
| 93 |
| |
| 94 |
34 | email = "foo", |
| 95 |
| ^^^^^^^ |
| 96 |
|
| 97 |
error: duplicate schemars attribute item `email` |
| 98 |
--> tests/ui/invalid_validation_attrs.rs:36:9 |
| 99 |
| |
| 100 |
36 | email, |
| 101 |
| ^^^^^ |
| 102 |
|
| 103 |
error: schemars attribute cannot contain both `url` and `email` |
| 104 |
--> tests/ui/invalid_validation_attrs.rs:37:9 |
| 105 |
| |
| 106 |
37 | url |
| 107 |
| ^^^ |
| 108 |
|
| 109 |
error: unknown schemars attribute `phone` |
| 110 |
--> tests/ui/invalid_validation_attrs.rs:32:9 |
| 111 |
| |
| 112 |
32 | phone, |
| 113 |
| ^^^^^ |