# Async Validation Support async. Make sure your code in `return new Promise()`. ```html Validate
{{  JSON.stringify(formValue, 0, 2) }}
``` ```js export default { data () { return { formValue: { user: { name: 'name', age: '15', address: '0' }, phone: '1251550092' }, rules: { user: { name: { required: true, trigger: 'blur', validator: (rule, value) => { return new Promise((resolve, reject) => { if (value !== 'testName') { reject('error name') // reject with error message } else { resolve() } }) } }, age: { required: true, trigger: 'input', validator: (rule, value) => { return new Promise((resolve, reject) => { setTimeout(() => { if (value <= 16) { reject('error age') } else { resolve() } }, 3000) }) } }, }, phone: { required: true, trigger: ['input'], validator: (rule, value) => { return /^[1]+[3,8]+\\d{9}$/.test(value) } } } } }, methods: { handleValidateClick (e) { e.preventDefault() this.$refs.form.validate(errors => { if (!errors) { this.$NMessage.success('Valid') } else { this.$NMessage.error('Invalid') console.log('errors', errors) } }) console.log('end') } } } ```