const schema = S.String.pipe(
S.compose(S.Trim),
S.minLength(1),
S.maxLength(255),
);
const result = S.decode(schema, ' ');
Effect.match(result, {
onFailure(error) {
// this is what I need error.errors.find(_ => _.type === 'minLength')
},
});
const schema = S.String.pipe(
S.compose(S.Trim),
S.minLength(1),
S.maxLength(255),
);
const result = S.decode(schema, ' ');
Effect.match(result, {
onFailure(error) {
// this is what I need error.errors.find(_ => _.type === 'minLength')
},
});