import { yupResolver } from '@hookform/resolvers/yup';
import { useForm } from 'react-hook-form';
const useValidationForm = (schema: any) => {
const { ...props } = useForm({
mode: 'onChange',
resolver: yupResolver(schema),
});
return {
...props,
};
};
export default useValidationForm;