Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove field validation #69

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions src/plugin/settings/settings_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,15 @@
R"json(",
"caption": "Access Key ID",
"description": "Cloud bucket access key ID",
"defaultValue": "",
"validationErrorMessage": "Access key ID must be >=16 alphanumeric characters (uppercase or 2-7).",
"validationRegex": "^[A-Z1-9]{16,128}$"
"defaultValue": ""
},
{
"type": "PasswordField",
"name": ")json" + kSecretKeyPasswordFieldId +
R"json(",
"caption": "Secret Key",
"description": "Cloud bucket secret key",
"defaultValue": "",
"validationErrorMessage": "Secret key must be 32 or 40 alphanumeric-plus-slash characters",
"validationRegex": "^[A-Za-z0-9\/+=]{32,128}$"
"defaultValue": ""
}
]
})json";
Expand All @@ -69,20 +65,15 @@
"caption": "Endpoint URL",
"description": "Set a different endpoint (different region or service)",
"defaultValue": ")json" + kDefaultEndpoint +
R"json(",
"validationErrorMessage": "Endpoint must be a URL (begin with 'http[s]://').",
"validationRegex": "(^$)|(^https?:\/\/.+$)",
"validationRegexFlags": "i"
R"json("
},
{
"type": "TextField",
"name": ")json" + kBucketNameTextFieldId +
R"json(",
"caption": "Bucket Name",
"description": "Specify a bucket name (leave empty to let the system automatically detect your bucket)",
"defaultValue": "",
"validationErrorMessage": "Bucket name can only contain lowercase letters, numbers, dashes, and dots.",
"validationRegex": "^[-.a-z0-9]*$"
"defaultValue": ""
},
{
"type": "SpinBox",
Expand Down Expand Up @@ -112,7 +103,7 @@
kCredentialGroupBox + (credentialsOnly ? "" : ("," + kAdvancedGroupBox + "," + kPluginWebsiteLink));

// top-level settings model
static const std::string kEngineSettingsModel = /*suppress newline*/ 1 + R"json(

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]

Check warning on line 106 in src/plugin/settings/settings_model.h

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, Release, clang)

adding 'int' to a string does not append to the string [-Wstring-plus-int]
{
"type": "Settings",
"items":
Expand Down
Loading