# Change Debug ```html show Validate
{{  JSON.stringify(formValue, 0, 2) }}
``` ```js export default { data () { return { show: true, formValue: { user: { name: '', age: false }, phone: '' }, rules: { user: { name: { required: true, message: 'Please input your name', trigger: 'blur' }, age: { required: true, message: 'Please input your age', validator (v) { return v === true } } }, phone: { required: true, message: 'Please input your number', trigger: ['input'] } } } }, methods: { handleShowClick (e) { e.preventDefault() this.show = !this.show }, handleValidateClick (e) { e.preventDefault() this.$refs.form.validate(errors => { if (!errors) { this.$NMessage.success('Valid') } else { console.log(errors) this.$NMessage.error('Invalid') } }) } } } ```