Skip to content

Commit 59a2ed3

Browse files
chore: updated example code
1 parent 23734ca commit 59a2ed3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

example/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import yup from 'yup'
2-
import yupLocalesKo from '../index.js'
1+
const yup = require('yup')
2+
const yupLocalesKo = require('../index')
33

44
yup.setLocale(yupLocalesKo)
55

66
const schema = yup.object().shape({
7-
name: yup.string().required(),
8-
age: yup.number().min(18),
7+
name: yup.string().required().label('이름'),
8+
age: yup.number().max(18).label('나이'),
99
})
1010

1111
const res = schema.validateSync({
@@ -16,4 +16,4 @@ const res = schema.validateSync({
1616
})
1717

1818
console.log(res)
19-
// ValidationError: age은(는) 18보다 크거나 같아야합니다
19+
// 나이는 18보다 작거나 같아야합니다

0 commit comments

Comments
 (0)