I have Formik form where initialValues
are not empty for all fields. I have the following condition on my submit button:
disabled={!(dirty && isValid)}
Yup validation schema:
const signInSchema = Yup.object().shape({
title: Yup.string()
.required(),
description: Yup.string()
.required(),
spec: Yup.string()
.required(),
link: Yup.string()
.url()
.required(t),
});
Why is the submit button disabled until I change value in some field? How can I make submit button enabled for this case if all initialValues
are correct and I have not made any changes to the form fields?