
Security News
CISA Extends MITRE Contract as Crisis Accelerates Alternative CVE Coordination Efforts
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.
laravel-vue2-validator
Advanced tools
Simple package to display error in vue from laravel validation
This package allow to display errors from laravel validation rules
! This package needs axios or vue-resource to work !
npm install --save laravel-vue2-validator
import LaravelVueValidator from 'laravel-vue2-validator'
Vue.use(LaravelVueValidator)
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()
<template>
<form @keydown="$errors.onKeydown($event)">
<input type='text' v-model='name' :inputClass="errorClass"/>
<error input="name" />
<button @click="submit">Submit</button>
</form>
</template>
<script>
export default {
data(){
return{
name: '',
errorClass: 'form-error'
}
},
methods(){
this.$http.post('/submit', {name: this.name});
},
destroyed () {
this.$errors.flush()
}
}
</script>
FAQs
Simple package to display error in vue from laravel validation
The npm package laravel-vue2-validator receives a total of 23 weekly downloads. As such, laravel-vue2-validator popularity was classified as not popular.
We found that laravel-vue2-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.
Product
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
Research
The Socket Research Team investigates a malicious npm package that appears to be an Advcash integration but triggers a reverse shell during payment success, targeting servers handling transactions.