Skip to content

Commit

Permalink
fix: set pattern attribute to match any value if not provided (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
wiseaidev authored Dec 6, 2024
1 parent 4fccee9 commit aceb1fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dioxus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/yew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit aceb1fe

Please sign in to comment.