Through a failed Horizon job I found out about the following: A user had entered an email address with an accidental space before the @
symbol. This caused the email to not be able to be sent and the Horizon job to fail.
Apparently, according to some email spec, spaces are allowed in the front part of an email address (before the @
symbol), and Laravel’s validation follows that (and as such, Statamic’s forms as well).
I got it resolved in the following way:
input type="email"
(should have been so before).type="email"
and strip any space that might be present in its value.sendForm: async function() {
// ...
// Get the value of each input type email
document.querySelectorAll('form input[type="email"]').forEach(
function(item) {
// Strip all spaces from the item's value
item.value = item.value.replace(/\s/g, '');
}
);
// ...
}