naive-ui/demo/documentation/components/inputNumber/enUS/validator.md

17 lines
193 B
Markdown
Raw Normal View History

2019-10-30 18:10:11 +08:00
# Validator
```html
<n-input-number
v-model="value"
:validator="validator"
/>
```
```js
export default {
data () {
return {
2020-01-29 16:14:59 +08:00
value: 0,
2019-10-30 18:10:11 +08:00
validator: x => x > 0
}
}
}
```