Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email validator on $page.form is outdated or just wrong #12136

Open
kratos-digital opened this issue Apr 18, 2024 · 3 comments
Open

Email validator on $page.form is outdated or just wrong #12136

kratos-digital opened this issue Apr 18, 2024 · 3 comments

Comments

@kratos-digital
Copy link

Describe the bug

Email validator returns incorrect email error on valid emails. This is valid email address: hello@kratos.digital and your system marks it as incorrect.

{"email":"hello@kratos.digital","incorrect":true}

Reproduction

Simple HTML form with email input type

Logs

No response

System Info

System:
    OS: macOS 14.4.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 2.80 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.7.3 - ~/.nvm/versions/node/v21.7.3/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v21.7.3/bin/npm
    pnpm: 8.9.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 123.0.6312.124
    Safari: 17.4.1
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.1.1 
    @sveltejs/adapter-node: ^3.0.1 => 3.0.3 
    @sveltejs/adapter-static: ^3.0.1 => 3.0.1 
    @sveltejs/kit: ^2.0.0 => 2.5.0 
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.2 
    svelte: ^4.2.7 => 4.2.11 
    vite: ^5.0.3 => 5.1.3

Severity

annoyance

Additional Information

No response

@dummdidumm
Copy link
Member

There's no built-in email validator whatsoever in SvelteKit. Please provide an minimum reproduction.

@kratos-digital
Copy link
Author

import { page } from '$app/stores';

And then using $page.form...

So you're saying that $app/stores is not part of SvelteKit?

@dummdidumm
Copy link
Member

This is not a minimum reproduction. A minimum reproduction is for example a link to stackblitz showcasing the problem.

$app/stores does belong to SvelteKit, but there's nothing built into SvelteKit that validates emails. I'm very certain that this is not related to SvelteKit but to your code not validating the email correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants