Skip to content

Instantly share code, notes, and snippets.

View psychonetic's full-sized avatar

Marco Martens psychonetic

View GitHub Profile
@psychonetic
psychonetic / CustomVeeValidator
Last active April 4, 2020 07:02
Vue-Dropzone and Vee-Validate
// Custom Validator to add errors into vuex store and also handle laravel form errors.
import { mapGetters } from 'vuex';
import { CLEAR_FORM_ERRORS, ERROR } from '../vuex/types';
import Vue from 'vue';
export default {
data() {
return {
errors: [],
keepServerErrors: ['unique', 'boolean', 'exists', 'regular_chars', 'identifier', 'date'],
@psychonetic
psychonetic / CoreFormRequest.php
Last active December 29, 2017 00:09
Laravel5 + Vue + VeeValidate
<?php
//All your form requests need to extend the coreFormRequest.
class CoreFormRequest extends FormRequest {
protected $failed = [];
/**
* Add a field with detailed information about failed fields.
* @param \Illuminate\Contracts\Validation\Validator
*/