All Projects → val-bubbleflat → Laravel Vue Validator

val-bubbleflat / Laravel Vue Validator

Licence: mit
Simple package to display error in vue from laravel validation

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Laravel Vue Validator

Validator Docs
Validação de CPF, CNPJ, CNH, NIS, Título Eleitoral e Cartão Nacional de Saúde com Laravel.
Stars: ✭ 334 (+943.75%)
Mutual labels:  validation, validation-library, laravel
thai-citizen-id-validator
🦉 Validate Thai Citizen ID with 0 dependencies 🇹🇭
Stars: ✭ 35 (+9.38%)
Mutual labels:  validation, validation-library
valify
Validates data in JavaScript in a very simple way
Stars: ✭ 13 (-59.37%)
Mutual labels:  validation, validation-library
Laravel Postal Code Validation
Worldwide postal code validation for Laravel and Lumen
Stars: ✭ 278 (+768.75%)
Mutual labels:  validation, laravel
Validot
Validot is a performance-first, compact library for advanced model validation. Using a simple declarative fluent interface, it efficiently handles classes, structs, nested members, collections, nullables, plus any relation or combination of them. It also supports translations, custom logic extensions with tests, and DI containers.
Stars: ✭ 198 (+518.75%)
Mutual labels:  validation, validation-library
Php Validate
Lightweight and feature-rich PHP validation and filtering library. Support scene grouping, pre-filtering, array checking, custom validators, custom messages. 轻量且功能丰富的PHP验证、过滤库。支持场景分组,前置过滤,数组检查,自定义验证器,自定义消息。
Stars: ✭ 225 (+603.13%)
Mutual labels:  validation, validation-library
Valiktor
Valiktor is a type-safe, powerful and extensible fluent DSL to validate objects in Kotlin
Stars: ✭ 267 (+734.38%)
Mutual labels:  validation, validation-library
Credit Card
Credit Card Validation
Stars: ✭ 150 (+368.75%)
Mutual labels:  validation, laravel
Laravel Validation Rules
A set of useful Laravel validation rules
Stars: ✭ 374 (+1068.75%)
Mutual labels:  validation, laravel
Govalidator
[Go] Package of validators and sanitizers for strings, numerics, slices and structs
Stars: ✭ 5,163 (+16034.38%)
Mutual labels:  validation, validation-library
Validation
The power of Respect Validation on Laravel
Stars: ✭ 188 (+487.5%)
Mutual labels:  validation, laravel
Identity Number
Validator for Swedish personal identity numbers (personnummer). For use "standalone" or with Laravel.
Stars: ✭ 17 (-46.87%)
Mutual labels:  validation, laravel
Deep Waters
🔥Deep Waters is an easy-to-compose functional validation system for javascript developers 🔥
Stars: ✭ 188 (+487.5%)
Mutual labels:  validation, validation-library
Password Validator
Validates password according to flexible and intuitive specification
Stars: ✭ 224 (+600%)
Mutual labels:  validation, validation-library
Validation Composite
Allows uniting of several validation rules into single one for easy re-usage
Stars: ✭ 159 (+396.88%)
Mutual labels:  validation, laravel
Pt Br Validator
Uma biblioteca contendo validações de formatos Brasileiros, para o Laravel
Stars: ✭ 255 (+696.88%)
Mutual labels:  validation, laravel
Laravel Phone
Phone number functionality for Laravel
Stars: ✭ 1,806 (+5543.75%)
Mutual labels:  validation, laravel
Validation
🔒 Laravel farsi/persian validation
Stars: ✭ 142 (+343.75%)
Mutual labels:  validation, laravel
Easyvalidation
✔️ A text and input validation library in Kotlin for Android
Stars: ✭ 328 (+925%)
Mutual labels:  validation, validation-library
Laravel Jsonapi
Basic setup framework for creating a Laravel JSON-API server
Stars: ✭ 16 (-50%)
Mutual labels:  validation, laravel

Laravel Vue Validator

By bubbleflat.com

This package allow to display errors from laravel validation rules

! This package needs vue-resource to work !

Installation

npm install --save laravel-vue-validator
import LaravelVueValidator from 'laravel-vue-validator'
  
Vue.use(LaravelVueValidator)

Usage Example

If you have in your laravel validation rule :

'name' => 'required|min:2|max:20'

You can display the error using in vue :

<error input="name" />

This error will only be displayed if a 422 error is produced by laravel when the form is submited (when the rule is not satisfied)

To flush errors in a vue component:

this.$errors.flush()

Full Example

<template>
	<input type='text' v-model='name' />
	<!-- 
	error do not need v-if,
	its content is displayed only if "name" has error after validation"
	-->
	<error input="name" />
	<button @click="submit">Submit</button>
</template>
<script>

export default {

	data(){
		return{
			name: ''
		}
	},

	methods(){
		// Error are displayed if Laravel backend return 422 Http code with name as error
		this.$http.post('/submit', {name: this.name});
	}

}

</script>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].