mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
18 lines
275 B
JavaScript
18 lines
275 B
JavaScript
const Schema = require('async-validator')
|
|
|
|
const descriptor = {
|
|
value: {
|
|
type: 'string',
|
|
required: true,
|
|
validator: () => true
|
|
}
|
|
}
|
|
|
|
const validator = new Schema(descriptor)
|
|
|
|
validator.validate({
|
|
value: '123'
|
|
}, (errors, fields) => {
|
|
console.log('wtf')
|
|
})
|