We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23734ca commit 59a2ed3Copy full SHA for 59a2ed3
example/index.js
@@ -1,11 +1,11 @@
1
-import yup from 'yup'
2
-import yupLocalesKo from '../index.js'
+const yup = require('yup')
+const yupLocalesKo = require('../index')
3
4
yup.setLocale(yupLocalesKo)
5
6
const schema = yup.object().shape({
7
- name: yup.string().required(),
8
- age: yup.number().min(18),
+ name: yup.string().required().label('이름'),
+ age: yup.number().max(18).label('나이'),
9
})
10
11
const res = schema.validateSync({
@@ -16,4 +16,4 @@ const res = schema.validateSync({
16
17
18
console.log(res)
19
-// ValidationError: age은(는) 18보다 크거나 같아야합니다
+// 나이는 18보다 작거나 같아야합니다
0 commit comments