From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 3/3] ui: auto-installer: use email validation from installer-types
Date: Wed, 27 May 2026 15:05:59 +0200 [thread overview]
Message-ID: <20260527130611.2995147-4-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260527130611.2995147-1-d.csapak@proxmox.com>
so we have the same check for the installer here in the ui. this way it
can't happen that the user enters an email address which the installer
itself rejects.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
.../remotes/auto_installer/prepared_answer_form.rs | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/ui/src/remotes/auto_installer/prepared_answer_form.rs b/ui/src/remotes/auto_installer/prepared_answer_form.rs
index 477a71f7..6d5c796b 100644
--- a/ui/src/remotes/auto_installer/prepared_answer_form.rs
+++ b/ui/src/remotes/auto_installer/prepared_answer_form.rs
@@ -15,9 +15,9 @@ use pdm_api_types::{
};
use proxmox_installer_types::{
answer::{
- BtrfsCompressOption, BtrfsOptions, FilesystemOptions, FilesystemType, FilterMatch,
- KeyboardLayout, LvmOptions, RebootMode, ZfsChecksumOption, ZfsCompressOption, ZfsOptions,
- BTRFS_COMPRESS_OPTIONS, FILESYSTEM_TYPE_OPTIONS, ROOT_PASSWORD_SCHEMA,
+ email_validate, BtrfsCompressOption, BtrfsOptions, FilesystemOptions, FilesystemType,
+ FilterMatch, KeyboardLayout, LvmOptions, RebootMode, ZfsChecksumOption, ZfsCompressOption,
+ ZfsOptions, BTRFS_COMPRESS_OPTIONS, FILESYSTEM_TYPE_OPTIONS, ROOT_PASSWORD_SCHEMA,
SUBSCRIPTION_KEY_SCHEMA, ZFS_CHECKSUM_OPTIONS, ZFS_COMPRESS_OPTIONS,
},
EMAIL_DEFAULT_PLACEHOLDER,
@@ -260,13 +260,7 @@ pub fn render_global_options_form(
.input_type(InputType::Email)
.value(config.mailto.clone())
.schema(&EMAIL_SCHEMA)
- .validate(|s: &String| {
- if s.ends_with(".invalid") {
- bail!(tr!("Invalid (default) email address"))
- } else {
- Ok(())
- }
- })
+ .validate(|email: &String| email_validate(email))
.required(true),
)
.with_field(
--
2.47.3
next prev parent reply other threads:[~2026-05-27 13:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 13:05 [PATCH datacenter-manager/installer/proxmox 0/3] use correct email validation in auto-installer ui Dominik Csapak
2026-05-27 13:05 ` [PATCH proxmox 1/3] installer types: move email validation from proxmox-installer-common Dominik Csapak
2026-05-27 13:05 ` [PATCH pve-installer 2/3] use email validation from installer-types Dominik Csapak
2026-05-27 13:05 ` Dominik Csapak [this message]
2026-05-28 11:00 ` partially-applied: [PATCH datacenter-manager/installer/proxmox 0/3] use correct email validation in auto-installer ui Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260527130611.2995147-4-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.