Error : TS2339 Property 'shape' does not exist on type 'typeof create'
Error : TS2339 Property 'shape' does not exist on type 'typeof create'
import * as yup from 'yup';
const loginSchema = yup.object.shape({
email: yup.string().required('Email Required !'),
pswd: yup.string().required('Password Required !')
});
错误是 yup.object 中不存在的形状,而 official documentation 使用相同的形状。
在此先感谢您的帮助!
打错了 yup.obejct.shape() 应该是 yup.object().shape().
import * as yup from 'yup';
const loginSchema = yup.object.shape({
email: yup.string().required('Email Required !'),
pswd: yup.string().required('Password Required !')
});
错误是 yup.object 中不存在的形状,而 official documentation 使用相同的形状。
在此先感谢您的帮助!
打错了 yup.obejct.shape() 应该是 yup.object().shape().