0.1.15 (#16)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: #16
This commit was merged in pull request #16.
This commit is contained in:
12
src/Schema/Email.ts
Normal file
12
src/Schema/Email.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Schema } from "@effect/schema"
|
||||
|
||||
|
||||
export const Email = Schema.pattern(
|
||||
/^(?!\.)(?!.*\.\.)([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",
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user