The yup validation is not firing all validation at one go on the 'fullName' field.
import { useForm, Controller } from "react-hook-form";
import * as yup from "yup";
import { yupResolver } from "@hookform/resolvers";
import { TextField } from "@material-ui/core";
import "./styles.css";
const schema = yup.object().shape({
name: yup
.string()
.min(3)
.lowercase()
.email()
.required()
});
export default function App() {
const { handleSubmit, control, errors } = useForm({
resolver: yupResolver(schema)
});
const onSubmit = data => {
console.log(data);
};
console.log(`on render errors: ${JSON.stringify(errors, null, 4)}`);
return (
<form onSubmit={handleSubmit(onSubmit)}>
<Controller
as={<TextField />}
name="name"
control={control}
defaultValue=""
/>
<button>Submit</button>
</form>
);
}
Here's CSB: https://codesandbox.io/s/competent-greider-8c8w8
Expected result: I was expecting multiple validation erros on name field.
Actual result: In contrast I can only get one validaiton error at a time.

I take abortEarly : false by default.
Any idea?
The yup validation is not firing all validation at one go on the 'fullName' field.
Here's CSB: https://codesandbox.io/s/competent-greider-8c8w8
Expected result: I was expecting multiple validation erros on name field.

Actual result: In contrast I can only get one validaiton error at a time.
I take
abortEarly : falseby default.Any idea?