[Bug] Form submission settings: Email Field mistakenly expects valid email address when it should refer to a field
In the Form Submission Settings section, if you attempt to set an "Email field" (like "email"), and save the settings, it throws an error indicating that it must be a valid email address. But in fact, this refers to "The name of the field in the contact form that contains the email address of the sender", so it very much should be a field like "email".
I was able to get it to work by setting form.* in the local configuration keys setting, and then setting this value manually in the config.toml file.
Just wanted to pass this along. The form otherwise is very handy!
I did read something like "some field should get a type change" and was thinking "might be an easy fix".
stappers@messer:/usr/src/stalwart/webadmin
$ git grep 'email address of the sender'
src/pages/config/schema/tracing.rs: .help("The email address of the sender")
stappers@messer:/usr/src/stalwart/webadmin
$ git grep --context 5 'email address of the sender'
src/pages/config/schema/tracing.rs- .build()
src/pages/config/schema/tracing.rs- // From address
src/pages/config/schema/tracing.rs- .new_field("notify.email.from-addr")
src/pages/config/schema/tracing.rs- .typ(Type::Input)
src/pages/config/schema/tracing.rs- .label("From")
src/pages/config/schema/tracing.rs: .help("The email address of the sender")
src/pages/config/schema/tracing.rs- .placeholder("[email protected]")
src/pages/config/schema/tracing.rs- .input_check_if_eq("notify.email.enable", ["true"], [], [Validator::Required, Validator::IsEmail])
src/pages/config/schema/tracing.rs- .enterprise_feature()
src/pages/config/schema/tracing.rs- .build()
src/pages/config/schema/tracing.rs- // To
stappers@messer:/usr/src/stalwart/webadmin
$
Now I admit that I can't translate the information in the issue report to a place in the source code. :-/
(Time will tell how many "Let me try to match the issue with the correct lines of source code" this comment triggers :-)
Oh, I think the field you mentioned above notify.email.from-addr should have the IsEmail validator.
The field in question should be form.email.field:
Mainly, this block: (lines 155 to 162 here) that should remove the IsEmail validator?
.new_field("form.email.field")
.label("E-mail field")
.help(concat!(
"The name of the field in the contact form that contains the ",
"e-mail address of the sender."
))
.typ(Type::Input)
.input_check([Transformer::Trim], [Validator::IsEmail])
On Sat, Oct 25, 2025 at 10:28:38PM -0700, oneleaftea wrote:
that should remove the IsEmail validator?
There is now https://github.com/stalwartlabs/webadmin/pull/111
If the Reported-by should be changed, say so.
Groeten Geert Stappers
Silence is hard to parse
On Sun, Oct 26, 2025 at 12:51:15AM -0700, Geert Stappers wrote:
stappersg left a comment On Sat, Oct 25, 2025 at 10:28:38PM -0700, oneleaftea wrote:
that should remove the IsEmail validator?
There is now https://github.com/stalwartlabs/webadmin/pull/111
That was an accident. (I started from my fork.)
There is now https://github.com/stalwartlabs/webadmin/pull/112 Which is just a single commit. (no other commits from my fork.)
If the Reported-by should be changed, say so.
That offer still stands.
Groeten Geert Stappers
Silence is hard to parse
Looks good!