From 6ffe6f900850db92b1ffd5392ddbce7cb8291ddb Mon Sep 17 00:00:00 2001 From: Mahmoud Harmouch Date: Fri, 6 Dec 2024 14:33:13 +0200 Subject: [PATCH] fix: set `pattern` attribute to match any value if not provided --- src/dioxus.rs | 2 +- src/yew.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dioxus.rs b/src/dioxus.rs index c6d60db..79cd98f 100644 --- a/src/dioxus.rs +++ b/src/dioxus.rs @@ -182,7 +182,7 @@ pub struct InputProps { pub multiple: bool, /// Regex pattern the value must match to be valid. - #[props(default = "")] + #[props(default = ".*")] pub pattern: &'static str, /// Boolean indicating whether the input is read-only. diff --git a/src/yew.rs b/src/yew.rs index 623eddc..3449499 100644 --- a/src/yew.rs +++ b/src/yew.rs @@ -182,7 +182,7 @@ pub struct Props { pub multiple: bool, /// Regex pattern the value must match to be valid. - #[prop_or_default] + #[prop_or(".*")] pub pattern: &'static str, /// Boolean indicating whether the input is read-only.