import {Schema} from "effect";
export const CreateScheduleInputSchema = Schema.Struct({
daysOfWeek: Schema.Set(Schema.Enums(DayOfWeek)).pipe(Schema.mutable),
});
const form = useAppForm({
defaultValues: {
daysOfWeek: new Set(),
},
validators: {
// The types are wrong here!
onSubmit: Schema.standardSchemaV1(CreateScheduleInputSchema),
},
});
import {Schema} from "effect";
export const CreateScheduleInputSchema = Schema.Struct({
daysOfWeek: Schema.Set(Schema.Enums(DayOfWeek)).pipe(Schema.mutable),
});
const form = useAppForm({
defaultValues: {
daysOfWeek: new Set(),
},
validators: {
// The types are wrong here!
onSubmit: Schema.standardSchemaV1(CreateScheduleInputSchema),
},
});