Fix regex
attribute when it uses dereferencing
This commit is contained in:
parent
ae2b5f16c0
commit
d7ff81de96
2 changed files with 12 additions and 4 deletions
|
@ -69,7 +69,7 @@ impl ValidationAttrs {
|
|||
|
||||
if let Some(regex) = &self.regex {
|
||||
mutators.push(quote! {
|
||||
schemars::_private::insert_validation_property(#mut_ref_schema, "string", "pattern", #regex.to_string());
|
||||
schemars::_private::insert_validation_property(#mut_ref_schema, "string", "pattern", (#regex).to_string());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue