안녕하세요 boilterplate 는 formik이 적용되어 있던데.. 비슷한 문법으로 스키마를 추가해봐도 디비에는 값을 받지 못하네요..
어떻게 하면 디비에 값을 받을 수 있을까요..?? accountnumber라는 항목을 추가하였습니다. server쪽 user.js에도 추가했어요
function RegisterPage(props) {
const dispatch = useDispatch();
return (
<Formik
initialValues={{
email: '',
lastName: '',
name: '',
password: '',
confirmPassword: '',
accountnumber:''
}}
validationSchema={Yup.object().shape({
name: Yup.string()
.required('Name is required'),
lastName: Yup.string()
.required('Last Name is required'),
email: Yup.string()
.email('Email is invalid')
.required('Email is required'),
password: Yup.string()
.min(6, 'Password must be at least 6 characters')
.required('Password is required'),
confirmPassword: Yup.string()
.oneOf([Yup.ref('password'), null], 'Passwords must match')
.required('Confirm Password is required'),
accountnumber: Yup.string()
.required('Password is required')
})}