In the registration form, but also in any form where validate="email" is set, the validation will mark this type of email as the correct email:
mail@mail
mail@mail.a
mail@mail.44
it helped me to replace the regex in media\system\js\fields\validate.js
// const regex = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
const regex = /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-zA-Z]{2,}?$/i;
well I just found that in html5 is standard also email without domains, however, on the server I do not want to register from any user who uses such email and usually just passes that someone misspelled email
mail@mail
mail@mail.a
mail@mail.44
it helped me to replace the regex in media\system\js\fields\validate.js
// const regex = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
const regex = /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-zA-Z]{2,}?$/i;
well I just found that in html5 is standard also email without domains, however, on the server I do not want to register from any user who uses such email and usually just passes that someone misspelled email
Statistics: Posted by zubata — Sat Dec 21, 2024 12:51 pm