
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
strictly-formed-io-ts
Advanced tools
io-ts wrapper for strictly-formed, a statically typed form library for typescript
io-ts wrapper for strictly-formed, a statically typed form library for typescript. Guarantee runtime type safety for custom static types.
Validate form input against io-ts runtime types, wrapping input changes in a fp-ts Either<Error, T> type.
StringInput
type Props = {
type: t.Type<T>,
value: string | undefined
className?: string
placeholder?: string
forwardedRef?: Ref<HTMLInputElement>
onChange(validation: t.Validation<T>, value: string | undefined): void
onSubmit?(value: T): void
onClear?: () => void
}
import t as * from 'io-ts';
import { StringInput } from 'strictly-formed-io-ts';
// EX - validate trimmed input is not empty
const NonEmptyStringIoTs = t.refinement(t.string, (str) => str.trim() !== '');
type NonEmptyString = t.TypeOf<typeof NonEmptyString>;
<StringInput<NonEmptyString>
className="string-input"
type={NonEmptyStringIoTs}
value={copyDate}
onChange={(validation, value) => {
validation.fold(
(validationErrors) => console.error(validationErrors),
// ^^^^^^^^^^^^^^ - T.ValidationError[]
(validValue) => console.log(validValue)
// ^^^^^^^^ - NonEmptyString
)
}}
onSubmit={submitString}
>
npm install strictly-formed
FAQs
io-ts wrapper for strictly-formed, a statically typed form library for typescript
The npm package strictly-formed-io-ts receives a total of 0 weekly downloads. As such, strictly-formed-io-ts popularity was classified as not popular.
We found that strictly-formed-io-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.