Enhances Roqueform fields with validation methods that use Standard Schema instances to detect issues.
import * as d from 'doubter';import { createField } from 'roqueform';import errorsPlugin from 'roqueform/plugin/errors';import schemaPlugin from 'roqueform/plugin/schema';const helloSchema = d.object({ hello: d.string(),});const field = createField({ hello: 'world' }, [ errorsPlugin<d.Issue>(), schemaPlugin(helloSchema),]);field.at('hello').validate(); Copy
import * as d from 'doubter';import { createField } from 'roqueform';import errorsPlugin from 'roqueform/plugin/errors';import schemaPlugin from 'roqueform/plugin/schema';const helloSchema = d.object({ hello: d.string(),});const field = createField({ hello: 'world' }, [ errorsPlugin<d.Issue>(), schemaPlugin(helloSchema),]);field.at('hello').validate();
Enhances Roqueform fields with validation methods that use Standard Schema instances to detect issues.