React Formik Tutorial - 20 - Nested Objects

React Formik Tutorial - 20 - Nested Objects

Codevolution

3 года назад

39,463 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@rengarajar2655
@rengarajar2655 - 18.02.2023 16:54

cool

Ответить
@shahnawazvhora3915
@shahnawazvhora3915 - 12.01.2023 11:13

how to solve formik yup nested object validation???

Ответить
@snake1625b
@snake1625b - 24.10.2022 22:24

great video but what about when youre using the helper function. when I try to do something like validateField('social.facebook'), it throws a weird error

Ответить
@lavagandhi1513
@lavagandhi1513 - 26.11.2021 12:19

how to add nested object in validationSchema

Ответить
@aezazali710
@aezazali710 - 04.08.2021 20:14

just the documentation with audio

Ответить
@gustavoduarte2221
@gustavoduarte2221 - 08.06.2021 18:35

we could to make a google meet ? i have a doubt..later i will pay a coffee to you

Ответить
@sharancj91
@sharancj91 - 18.05.2021 16:47

Bro, this is exactly what I needed!!

Ответить
@yossisternlicht21
@yossisternlicht21 - 20.04.2021 16:49

If you want to validate the nested object, you can do something like this.

const validationSchema = Yup.object(
{
name: Yup.string().required("Required"),
email: Yup.string().email("Please provide a valid email address").required("Required"),
channel: Yup.string()required("Required"),
address: Yup.string().required("Required"),
social: Yup.object().shape({

twitter: Yup.string().required("Required"),
facebook: Yup.string().required("Required")
})

}
);

Ответить
@johnconnor9787
@johnconnor9787 - 21.03.2021 13:34

maaaaaaaaaaaaaaaan you are awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Ответить
@AMMARYASIR29
@AMMARYASIR29 - 19.03.2021 19:20

What if I want to useFormik hook rather than Formik component
How can I immplement nested obj ?

Ответить
@Finn-jp6pn
@Finn-jp6pn - 13.03.2021 08:44

Hi. Has anyone tried to use ErrorMessage for the nested fields?

I cannot seem to access if I follow the below approach
<ErrorMessage name='social.facebook' component={TextError} />

The render-props approach seems to work
<div className='form-control'>
<label htmlFor='twitter'>Twitter profile</label>
<Field type='text' id='twitter' name='social.twitter' />
</div>
<ErrorMessage name='social.twitter'>
{(errorMsg) => {
return <TextError errorMsg={errorMsg} />;
}}
</ErrorMessage>

Ответить
@habib3023
@habib3023 - 25.10.2020 07:05

143 like & 0 dislike. That's prove your quality of content.. great job @codevolution

Ответить
@veerendhar
@veerendhar - 20.10.2020 08:48

Plz cover context api and react testing library in dept

Ответить
@zahlen_0092
@zahlen_0092 - 19.08.2020 01:00

it's funny that that "commenst" stuck haha, that aside, this series has been great help!

Ответить
@BlackMarq20
@BlackMarq20 - 14.08.2020 16:39

Man I was waiting for like 4 videos for you to fix that typo, glad you got it :)!

Ответить
@susantadas972
@susantadas972 - 05.07.2020 15:46

how can I validate the nested object with useFormik hook

Ответить
@Sampath251
@Sampath251 - 31.05.2020 22:35

please make a tutorial on react router. It's a request

Ответить
@rahulshimpi8914
@rahulshimpi8914 - 30.05.2020 12:16

Great job bro. I am a beginner to react and watch this series now I am so confident in form creation. Thank you so much.

Ответить
@supindersingh8882
@supindersingh8882 - 25.05.2020 18:08

Great video. But what about yup validation for nested objects?

Ответить
@kamalpandey7177
@kamalpandey7177 - 25.05.2020 17:10

Looking forward for the wizard form

Ответить
@steveariss637
@steveariss637 - 25.05.2020 15:45

This has been a great series - and this video came just in time! Was about to tackle a problem that will be solved with nested objects. Thanks!

Ответить