form
form copied to clipboard
docs(form): Effect Schema also supports Standard Schema
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