I'm working with React Hook Forms.
<Controller
control={control}
rules={{ required: "Required" }}
error={errors.state ? true : false}
helperText={errors.state && errors.state.message}
name="state"
as={
<AutoComplete
options={stateOptions}
onChange={selectStateHandler}
label="State"
value={selectedState}
/>
}
/>
helper text is working with TextField but not with Autocomplete. TextField border color changes on error, I want same with Autocomplete.