Fix
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2025-09-23 22:13:00 +02:00
parent 9033fcbb32
commit e2cd7bb671
2 changed files with 14 additions and 2 deletions

View File

@@ -6,8 +6,18 @@ import { Component, Form } from "effect-fc"
import { useContext, useFork } from "effect-fc/hooks"
const email = Schema.pattern<typeof Schema.String>(
/^(?!\.)(?!.*\.\.)([A-Z0-9_+-.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9-]*\.)+[A-Z]{2,}$/i,
{
identifier: "email",
title: "email",
message: () => "Not an email address",
},
)
const RegisterFormSchema = Schema.Struct({
email: Schema.String,
email: Schema.String.pipe(email),
password: Schema.String.pipe(Schema.minLength(3)),
})
@@ -24,6 +34,7 @@ class RegisterPage extends Component.makeUntraced(function* RegisterPage() {
const passwordInput = yield* Form.useInput(form, ["password"], { debounce: "200 millis" })
yield* useFork(() => Stream.runForEach(form.valueRef.changes, Console.log), [])
// yield* useFork(() => Stream.runForEach(form.errorRef.changes, Console.log), [])
return (
<Container>