Skip to content

Commit 7ee0713

Browse files
committed
chore(example): validator use locale set to en-US
1 parent 8a6a2a3 commit 7ee0713

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

example/pages/validator.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
import CubePage from '../components/cube-page.vue'
5959
6060
// Add or rewrite the build-in rule, type and message.
61-
import { Validator } from '../../src/module'
61+
import { Validator, Locale } from '../../src/module'
62+
import enLang from '../../src/locale/lang/en-US'
63+
6264
export default {
6365
data() {
6466
return {
@@ -127,6 +129,7 @@
127129
}
128130
},
129131
created() {
132+
Locale.use('en-US', enLang)
130133
Validator.addRule('odd', (val, config, type) => {
131134
return Number(val) % 2 === 1
132135
})

0 commit comments

Comments
 (0)