HTML5 Validation

Open to all! Ask other shopowners for help.
Post Reply
User avatar
bonbec
Contributor
Posts: 190
Joined: Mon Oct 26, 2020 12:23 pm
Phoenix Version: V1.1.0.7
Has thanked: 54 times
Been thanked: 40 times

HTML5 Validation

Post by bonbec »

For email address verification, this checks for the presence of @ but not .Tld
For example toto@xxx is valid.
If it helps, on this page there is an example of email address verification (see the JS tab to see the code):
https://bootsnipp.com/snippets/6aGm
Old MS2.2 PHP7.4 site being converted to CE Phoenix v1.1.0.6 PHP 8.3


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Bootstrap 5 Template SNEAK PEEK

Post by burt »

bonbec wrote: Thu Sep 19, 2024 12:17 pm For email address verification, this checks for the presence of @ but not .Tld
For example toto@xxx is valid.
https://developer.mozilla.org/en-US/doc ... nput/email

I -think- you are saying that toto@xxx should NOT be allowed?
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
bonbec
Contributor
Posts: 190
Joined: Mon Oct 26, 2020 12:23 pm
Phoenix Version: V1.1.0.7
Has thanked: 54 times
Been thanked: 40 times

Re: Bootstrap 5 Template SNEAK PEEK

Post by bonbec »

burt wrote: Thu Sep 19, 2024 12:53 pmI -think- you are saying that toto@xxx should NOT be allowed?
yes, I have a little trouble expressing myself in English.
I have clients who have @hotmail.fr or @hotmail.com email addresses
Making the .Tld mandatory helps avoid errors when the green sign appears, the client can think that the address is good when a part is missing.
Old MS2.2 PHP7.4 site being converted to CE Phoenix v1.1.0.6 PHP 8.3
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Bootstrap 5 Template SNEAK PEEK

Post by burt »

That level of validation is not something that would be suitable for Core code.

We use HTML5 validation on inputs in forms, the HTML5 validation simply looks for a valid input string and ticks (or red) the box appropriately. Unfortunately (for your needs/wants) toto@xxx is a valid email string according to HTML5 specs.

Very simple task for any shopowner to add in their own validation on top of Core, it's just a pattern to add to the input (*don't use javascript*).
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
bonbec
Contributor
Posts: 190
Joined: Mon Oct 26, 2020 12:23 pm
Phoenix Version: V1.1.0.7
Has thanked: 54 times
Been thanked: 40 times

Re: Bootstrap 5 Template SNEAK PEEK

Post by bonbec »

ok, thanks for the explanation.
I will see this to improve when it is available.
My clientele is mostly elderly, we must put a maximum of help to facilitate the intention of purchase.

I continue to explore the "Bootstrap 5 Template SNEAK PEEK", it is super cool and I imagine the work behind it, so a big thank you to the PhoenixCart team.
Old MS2.2 PHP7.4 site being converted to CE Phoenix v1.1.0.6 PHP 8.3


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply