Skip to content

Add Forms validation #2

@slv

Description

@slv

Directly support a way to pass a validation mechanism to forms, something like:

const schema1 = yup.object().shape({
  email_address: yup.string().email()
});

const schema2 = Joi.object({
    email_address: Joi.string()
        .email({ minDomainSegments: 2, tlds: { allow: ['com', 'net'] } })
});

<Form schema={/* schema1, schema2 */} validationMode={/* ONSUBMIT, ONCHANGE, ... */}>
  <Input name="email_address" />
</Form>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions