Skip to content

Commit 9cf7794

Browse files
author
Philipp
committed
Updated readme
1 parent 5c3f8f6 commit 9cf7794

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

README.md

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1-
# Vee Validate for Laravel backend validation
2-
Simple vue js plugin that makes it easier to show validation errors from Laravel validation by using vee-validate.
1+
# 🙌 VeeValidate with Laravel validation errors
2+
[![Latest Version on NPM](https://img.shields.io/npm/v/%40pmochine%2Fvee-validate-laravel.svg?style=flat-square)](https://npmjs.com/package/%40pmochine%2Fvee-validate-laravel)
3+
[![Total Downloads on NPM](https://img.shields.io/npm/dt/%40pmochine%2Fvee-validate-laravel.svg)](https://www.npmjs.com/package/%40pmochine%2Fvee-validate-laravel)
4+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
35

4-
### Getting Started
6+
![VeeValidate with Laravel validation](https://baianat.github.io/vee-validate/logo.png)
57

6-
In your script entry point:
8+
**If you are looking for an easy module for showing Laravel validation errors, this package is for you. 😜**
9+
10+
>***Prerequisites**: vue >= 2.0.0 and vee-validate >= 2.1.0
11+
12+
*⚠️ Combine this package with a [global axios interceptor](https://github.com/pmochine/vue-axios-interceptors) to get the most of it*
13+
14+
## Installation in 2 Steps*
15+
16+
### 1: Install the package 💻 on [NPM](https://www.npmjs.com/package/@pmochine/vee-validate-laravel)
17+
```bash
18+
npm i @pmochine/vee-validate-laravel
19+
```
20+
### 2: Add the package in your main.js
721

822
```javascript
923
import Vue from 'vue';
@@ -12,26 +26,25 @@ import VeeValidateLaravel from '@pmochine/vee-validate-laravel';
1226

1327
Vue.use(VeeValidate);
1428
Vue.use(VeeValidateLaravel);
15-
1629
```
1730

18-
From Laravel:
1931

20-
```php
32+
## 💪 How to use it
2133

34+
Somewhere in Laravel:
35+
36+
```php
2237
$request->validate([
2338
'name' => 'required|min:3|max:255'
2439
]);
2540

26-
2741
```
2842

2943

30-
In Vue classes:
44+
Somewhere in Vue:
3145

3246

3347
```vue
34-
3548
<template>
3649
<div class="form-group" v-bind:class="{'has-error' : errors.has('name')}">
3750
<label for="name">Name</label>
@@ -67,6 +80,16 @@ In Vue classes:
6780
}
6881
}
6982
</script>
70-
7183
```
7284

85+
## Security
86+
87+
If you discover any security related issues, please don't email me. I'm afraid 😱. avidofood@protonmail.com
88+
89+
## Credits
90+
91+
Now comes the best part! 😍
92+
93+
- Idea found on https://github.com/RobertGlynWilliams/vee-validate-laravel
94+
95+
Oh come on. You read everything?? If you liked it so far, hit the ⭐️ button to give me a 🤩 face.

0 commit comments

Comments
 (0)