R
Reactiflux

React-hook-form displaying required type error even when fields are populated.

React-hook-form displaying required type error even when fields are populated.

GGeethika10/5/2023
Hi! I am using react-hook-form in my React.js project. I have fields that use controller as they are custom components. When I fill in those fields and submit I am getting the error message fields are required. Below is the code for components:
<Controller control={control} name="status" rules={{ required: true }} render={({ field: { onChange, value } }) => ( <FormRowSelect name="status" labelText="FreeLance Availability" value={value} handleChange={onChange} list={["Yes", "No"]} disabled={!isEditing} /> )} /> {errors.status && <Notification color="red" title="Please fill!"> Status is mandatory! </Notification> }
Please help!
UUUnknown User10/5/2023
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

React-hook-form displaying required type error even when fields are populated.

Join Server