Skip to content

Commit

Permalink
fix doctrings for Textbox validator (#3710)
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceXwq committed Mar 16, 2024
1 parent 14b65a0 commit 77e90f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/reference/blocks/textbox.md
Expand Up @@ -18,7 +18,7 @@ f

## Validation

The `validator` attribute is used with `validate_textbox(string, validator)` to determine if the current string is valid. It can be a `Regex` that needs to match the complete string, or a `Function` taking a `String` as input and returning a `Bool`. If the validator is a type T (for example `Float64`), validation will be `tryparse(string, T)`. The textbox will not allow submitting the currently entered value if the validator doesn't pass.
The `validator` attribute is used with `validate_textbox(string, validator)` to determine if the current string is valid. It can be a `Regex` that needs to match the complete string, or a `Function` taking a `String` as input and returning a `Bool`. If the validator is a type T (for example `Float64`), validation will be `tryparse(T, string)`. The textbox will not allow submitting the currently entered value if the validator doesn't pass.

\begin{examplefigure}{}
```julia
Expand Down
2 changes: 1 addition & 1 deletion src/makielayout/types.jl
Expand Up @@ -1346,7 +1346,7 @@ end
cornerradius = 5
"Corner segments of one rounded corner."
cornersegments = 20
"Validator that is called with validate_textbox(string, validator) to determine if the current string is valid. Can by default be a RegEx that needs to match the complete string, or a function taking a string as input and returning a Bool. If the validator is a type T (for example Float64), validation will be `tryparse(string, T)`."
"Validator that is called with validate_textbox(string, validator) to determine if the current string is valid. Can by default be a RegEx that needs to match the complete string, or a function taking a string as input and returning a Bool. If the validator is a type T (for example Float64), validation will be `tryparse(T, string)`."
validator = str -> true
"Restricts the allowed unicode input via is_allowed(char, restriction)."
restriction = nothing
Expand Down

0 comments on commit 77e90f5

Please sign in to comment.