Closed matyalatte closed 4 months ago
Validator was added at a4e1bb64bdac6ee7e8d0239df832dbd16bde3224 ~ 1acea935a95d2621db38ae2454ffdc84ee4a0e74.
The new options should be defined in the validator
option.
"components": [
{
"type": "file",
"label": "PNG or JPG",
"validator": {
"not_empty": true,
"exist": true
}
}
]
Each component can show an validation error message when clicking the execution button.
You can also override the error messages with *_error
options.
"components": [
{
"type": "file",
"label": "PNG or JPG",
"validator": {
"not_empty": true,
"not_empty_error": "Type something"
"exist": true,
"exist_error": "Custom error message!"
}
}
]
Close with v0.7.0 release.
Related to https://github.com/matyalatte/tuw/issues/23.
Some options to show error dialogs when there are invalid strings in text boxes.
regex
: Text should match the regular expression.wildcard
: Text should match the wildcard pattern.not_empty
: Text box should not be empty.exist
: Path should exist.