Closed timmwille closed 2 years ago
The technology behind the contact form is from https://formspree.io/ and we have no influence on the technical implementation. If no *.agency email addresses can be used, then another technology from another provider must be found for this. An alternative would still be to enter the email address directly on the website, so that the user can contact via the email address itself.
Ok so here the Form Phone section could be removed or made optional:
https://github.com/ASKnetCommunity/ASKnet.Community/blob/main/_data/sitetext.yml
(btw. the spanish version can be deleted as well)
might also require editing here:
https://github.com/ASKnetCommunity/ASKnet.Community/blob/main/_includes/contact.html
here is the main file to be edited it seems:
https://github.com/ASKnetCommunity/ASKnet.Community/blob/main/assets/js/contact_me.js
This is also good to prevent spam:
https://help.formspree.io/hc/en-us/articles/360013580813-Honeypot-spam-filtering
more hints:
965
:
https://github.com/ASKnetCommunity/ASKnet.Community/blob/main/assets/js/jqBootstrapValidation.jsregex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}",
as far as I understand the {2,4}
is limiting the input after the domain dot .
to max. 4 charaters !!?
yes, after the last .
, so ...@google.com
is fine, ...@fabcity.hamburg
is not.
Good find! :-)
I am totally not into this issue/problem, but this smells like a possible violation of fail fast. What happens if this regex does not fit? (btw, you can link directly to the line in the file by clicking on the line number: https://github.com/ASKnetCommunity/ASKnet.Community/blob/main/assets/js/jqBootstrapValidation.js#L965 )
@hoijui do you have a good suggestion for an email regex? one that characterizes E-Mail but does not limit the domain ending so much? The error Message currently is a bit weak :)
You could just remove the 4
, to make it {2,}
, which means at least 2 (without upper bound).
You could just remove the
4
, to make it{2,}
, which means at least 2 (without upper bound).
ok sounds good I found this page but honestly I'm not skilled enough in regex to find the fitting option: https://emailregex.com
edit: the Swift option seems to be the closest/best [A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}
As I see it, this regex'es main task is, to make sure the user does not enter something other then his email (as in, mixes up fields).
with a regex alone, it is impossible to check if an email is valid. for that one would have to send an email and check the response from the server. So in my yes, as long as there is an @
somewhere in the field, and something before and after it, it is good enough.
For example, I do not know if there are first level domains (com, org, hamburg, ...) that contain a number, or if there will be any in the future. If so, then this regex would again fail.
So the simplest thing, that should not ever fail, would be .+@.+
(kinda looks like a crying clown-face, no? :D ).
@bmen is this done?