📜  自定义 yup 号码 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:48.631000             🧑  作者: Mango

代码示例1
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')
});