From 1b62217680ce7b85c7cdbf79f6d982c319af81b7 Mon Sep 17 00:00:00 2001 From: Robert Glyn Williams Date: Fri, 29 Dec 2017 22:07:52 +0100 Subject: [PATCH] Update README.md --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 83d42eb..b916dd3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,27 @@ -# vee-validate-laravel +# Vee Validate for Laravel backend validation Extension of vee-validate to support Laravel backend validation + +### Getting Started + +In your script entry point: + +```javascript +import Vue from 'vue'; +import VeeValidate from 'vee-validate'; +import VeeValidateLaravel from 'vee-validate-laravel'; + +Vue.use(VeeValidate); +Vue.use(VeeValidateLaravel); + +``` + +In Vue classes: + +```javascript + +axios.post('/example', data).then(res => { +}).catch(err => { + this.$setLaravelValidationErrorsFromResponse(err.response.data); +}); + +```