Category "yup"

(Yup) how to create multiple errors using a single .test() function

EDIT: while the accepted solution worked, this worked much better in my use case I have one function that validates that neither input field A nor input field B

onChange on TextInput Not Working Inside Formik

Generally <TextInput> allows you to type even when you're just specifying a placeholder. However, when using within the Formik form, I am unable to type a

How do I not allow special characters and space in react hook using yup

Here's the code: { label: "Name", name: "name", placeholder: 'Name', type: "text", rule: yup.string() .required('Name is a r

How to use yup validation on dynamic form using react-hook-form with useFieldArray

I'm trying to create a dynamic form using react-hook-form's useFieldArray hook. The user should be able to add or remove fields, thus making it dynamic. I've lo

Yup / Formik async validation with debounce

How can debounce be applied to the async validation below (code from Yup's github) ? let asyncJimmySchema = string().test( 'is-jimmy', '${path} is not Jimm

Validating file size and format with YUP

I have a form using reactjs + formik + yup. I have a multi file upload field. I want to validate the file format and max size using yup. How can I do this?

Yup returns always an error even if all fields are valid

Yup is returning always one error in the array even though all fields are valid. The validation is working fine, is checking each field and showing the errors c

Validating file presence with YUP

I'm using Yup to validate my form. In one of my form, I want to validate that one <input type="file" /> has a file. I've tested this (and it's not workin

Yup / Formik validation using dynamic keys

I am trying to validate a form with a dynamic amount of fields - i.e., data is returned from an API that determines how many rows are shown, and for each row th