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

docs(form): Effect Schema also supports Standard Schema #1259

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rehos
Copy link

@rehos rehos commented Mar 9, 2025

Effect Schema also supports Standard Schema.

The StackBlitz example can also be modified with:

import { Schema as S } from 'effect';

const EffectSchema = S.standardSchemaV1(
  S.Struct({
    firstName: S.String.pipe(
      S.minLength(3),
      S.annotations({
        message: () => '[Effect/Schema] You must have a length of at least 3',
      })
    ),
    lastName: S.String.pipe(
      S.minLength(3),
      S.annotations({
        message: () => '[Effect/Schema] You must have a length of at least 3',
      })
    ),
  })
);

See it live

Effect Schema also supports Standard Schema
@rehos rehos changed the title Update validation.md Update validation.md - Effect Schema also supports Standard Schema Mar 9, 2025
@rehos rehos changed the title Update validation.md - Effect Schema also supports Standard Schema docs(form): Effect Schema also supports Standard Schema Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant