📅  最后修改于: 2022-03-11 14:48:48.631000             🧑  作者: Mango
const schema = yup.object().shape({
name: yup.string()
.required('name is required'),
age: yup.number()
.typeError('age must be a number')
.positive('age must be greater than zero')
.required('age is required')
});