Skip to content

Commit

Permalink
Fix duplicate config, loosen validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
GUI committed Nov 18, 2023
1 parent e549da6 commit 3470db9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/api-umbrella/web-app/models/api_user.lua
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,6 @@ ApiUser = model_ext.new_class("api_users", {
validate_field(errors, data, "registration_origin", t("Registration origin"), {
{ validation_ext.db_null_optional.string:maxlen(1000), string.format(t("is too long (maximum is %d characters)"), 1000) },
})
validate_field(errors, data, "registration_origin", t("Registration origin"), {
{ validation_ext.db_null_optional.string:maxlen(1000), string.format(t("is too long (maximum is %d characters)"), 1000) },
})
validate_field(errors, data, "registration_recaptcha_v2_success", t("CAPTCHA success"), {
{ validation_ext.db_null_optional.boolean, t("is not a boolean") },
})
Expand All @@ -349,7 +346,7 @@ ApiUser = model_ext.new_class("api_users", {
{ validation_ext.db_null_optional.boolean, t("is not a boolean") },
})
validate_field(errors, data, "registration_recaptcha_v3_score", t("CAPTCHA score"), {
{ validation_ext.db_null_optional.number:between(0, 1), t("is not a number") },
{ validation_ext.db_null_optional.number, t("is not a number") },
})
validate_field(errors, data, "registration_recaptcha_v3_action", t("CAPTCHA action"), {
{ validation_ext.db_null_optional.string:maxlen(255), string.format(t("is too long (maximum is %d characters)"), 255) },
Expand Down

0 comments on commit 3470db9

Please sign in to comment.