@@ -842,7 +842,7 @@
{
"description": "Color hex string, for example: #fff, #ffffff, or #ffffffff.",
"type": "string",
- "pattern": "#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$"
+ "pattern": "^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$"
},
"description": "Array of RGB colors. Each value has minimum of 0 and maximum of 255.",
@@ -1380,7 +1380,7 @@ impl schemars::JsonSchema for Color {
let schemars::schema::Schema::Object(str_schema) = any_of.first_mut().unwrap() else {
unreachable!()
};
- str_schema.string().pattern = Some("#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$".into());
+ str_schema.string().pattern = Some("^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$".into());
schema.into()
}