From 5671a1d7aab4fe87f5d626ccb68a06169b21f033 Mon Sep 17 00:00:00 2001 From: Stan Wohlwend Date: Wed, 6 Mar 2024 12:59:20 +0100 Subject: [PATCH] No longer export validateEmail --- apps/dev/src/app/signin/custom-credential.tsx | 8 ++------ .../01-customization/02-examples/01-signin.md | 8 ++------ packages/stack/src/index.ts | 1 - 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/apps/dev/src/app/signin/custom-credential.tsx b/apps/dev/src/app/signin/custom-credential.tsx index c7a7bb80e..a24d1622f 100644 --- a/apps/dev/src/app/signin/custom-credential.tsx +++ b/apps/dev/src/app/signin/custom-credential.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-misused-promises */ 'use client'; -import { useStackApp, validateEmail } from "@stackframe/stack"; +import { useStackApp } from "@stackframe/stack"; import { useState } from "react"; export default function CustomCredentialSignIn() { @@ -10,10 +10,6 @@ export default function CustomCredentialSignIn() { const app = useStackApp(); const onSubmit = async () => { - if (!validateEmail(email)) { - setError('Please enter a valid email'); - return; - } if (!password) { setError('Please enter your password'); return; @@ -33,4 +29,4 @@ export default function CustomCredentialSignIn() { ); -} \ No newline at end of file +} diff --git a/docs/docs/02-advanced-guides/01-customization/02-examples/01-signin.md b/docs/docs/02-advanced-guides/01-customization/02-examples/01-signin.md index ca12d9056..72ce42638 100644 --- a/docs/docs/02-advanced-guides/01-customization/02-examples/01-signin.md +++ b/docs/docs/02-advanced-guides/01-customization/02-examples/01-signin.md @@ -55,7 +55,7 @@ export default function CustomOAuthSignIn() { ```tsx 'use client'; -import { useStackApp, validateEmail } from "@stackframe/stack"; +import { useStackApp } from "@stackframe/stack"; import { useState } from "react"; export default function CustomCredentialSignIn() { @@ -65,10 +65,6 @@ export default function CustomCredentialSignIn() { const app = useStackApp(); const onSubmit = async () => { - if (!validateEmail(email)) { - setError('Please enter a valid email'); - return; - } if (!password) { setError('Please enter your password'); return; @@ -89,4 +85,4 @@ export default function CustomCredentialSignIn() { ); } -``` \ No newline at end of file +``` diff --git a/packages/stack/src/index.ts b/packages/stack/src/index.ts index 80ee71b94..fb52f13a1 100644 --- a/packages/stack/src/index.ts +++ b/packages/stack/src/index.ts @@ -9,7 +9,6 @@ export { default as StackHandler } from "./components/StackHandler"; export { default as EmailVerification } from "./components/EmailVerification"; export { default as PasswordReset } from "./components/PasswordReset"; export { default as ForgotPassword } from "./components/ForgotPassword"; -export { validateEmail } from "./utils/email"; // TODO we can't import it like this import '../dist/tailwind.css';