Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

laravel-vue2-validator

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laravel-vue2-validator - npm Package Compare versions

Comparing version 0.0.9-beta-11 to 0.0.9-beta-13

49

dist/index.js

@@ -1,3 +0,46 @@

import LValidator from'./LValidator';import ErrorComponent from'./ErrorComponent.vue';import axios from'axios';class Validator{install(a,b={}){a.component('error',ErrorComponent),a.http&&a.http.interceptors.push((a,b)=>{b(a=>{422===a.status&&LValidator.fill(a.body)})}),axios&&axios.interceptors.response.use(a=>a,a=>(422===a.response.status&&LValidator.fill(a.response.data.errors),Promise.reject(a))),a.mixin({beforeCreate(){//errors
this.$options.$errors={},a.util.defineReactive(this.$options,'$errors',LValidator),this.$options.computed||(this.$options.computed={}),this.$options.computed.$errors=function(){return this.$options.$errors}}})}}export default new Validator;export{LValidator};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJMVmFsaWRhdG9yIiwiRXJyb3JDb21wb25lbnQiLCJheGlvcyIsIlZhbGlkYXRvciIsImluc3RhbGwiLCJWdWUiLCJvcHRpb25zIiwiY29tcG9uZW50IiwiaHR0cCIsImludGVyY2VwdG9ycyIsInB1c2giLCJyZXF1ZXN0IiwibmV4dCIsInJlc3BvbnNlIiwic3RhdHVzIiwiZmlsbCIsImJvZHkiLCJ1c2UiLCJlcnJvciIsImRhdGEiLCJlcnJvcnMiLCJQcm9taXNlIiwicmVqZWN0IiwibWl4aW4iLCJiZWZvcmVDcmVhdGUiLCIkb3B0aW9ucyIsIiRlcnJvcnMiLCJ1dGlsIiwiZGVmaW5lUmVhY3RpdmUiLCJjb21wdXRlZCJdLCJtYXBwaW5ncyI6IkFBQUEsTUFBT0EsV0FBUCxL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wb25zZS5zdGF0dXMgPT09IDQyMikge1xuICAgICAgICAgIExWYWxpZGF0b3IuZmlsbChlcnJvci5yZXNwb25zZS5kYXRhLmVycm9ycylcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoZXJyb3IpO1xuICAgICAgfSk7XG4gICAgfVxuICAgIFZ1ZS5taXhpbih7XG4gICAgICBiZWZvcmVDcmVhdGUgKCkge1xuICAgICAgICAvL2Vycm9yc1xuICAgICAgICB0aGlzLiRvcHRpb25zLiRlcnJvcnMgPSB7fTtcbiAgICAgICAgVnVlLnV0aWwuZGVmaW5lUmVhY3RpdmUodGhpcy4kb3B0aW9ucywgJyRlcnJvcnMnLCBMVmFsaWRhdG9yKTtcbiAgICAgICAgaWYgKCF0aGlzLiRvcHRpb25zLmNvbXB1dGVkKSB7XG4gICAgICAgICAgdGhpcy4kb3B0aW9ucy5jb21wdXRlZCA9IHt9XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy4kb3B0aW9ucy5jb21wdXRlZFtcIiRlcnJvcnNcIl0gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMuJG9wdGlvbnMuJGVycm9ycztcbiAgICAgICAgfTtcbiAgICAgIH0sXG5cbiAgICB9KVxuXG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgbmV3IFZhbGlkYXRvcigpXG5leHBvcnQgeyBMVmFsaWRhdG9yIH1cbiJdfQ==
import LValidator from './LValidator';
import ErrorComponent from './ErrorComponent.vue';
import axios from 'axios';
class Validator {
install(Vue, options = {}) {
Vue.component('error', ErrorComponent);
if (Vue.http) {
Vue.http.interceptors.push((request, next) => {
next(response => {
if (response.status === 422) {
LValidator.fill(response.body);
}
});
});
}
if (axios) {
axios.interceptors.response.use(response => {
return response;
}, error => {
if (error.response.status === 422) {
LValidator.fill(error.response.data.errors);
}
return Promise.reject(error);
});
}
Vue.mixin({
beforeCreate() {
//errors
this.$options.$errors = {};
Vue.util.defineReactive(this.$options, '$errors', LValidator);
if (!this.$options.computed) {
this.$options.computed = {};
}
this.$options.computed["$errors"] = function () {
return this.$options.$errors;
};
}
});
}
}
export default new Validator();
export { LValidator };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJMVmFsaWRhdG9yIiwiRXJyb3JDb21wb25lbnQiLCJheGlvcyIsIlZhbGlkYXRvciIsImluc3RhbGwiLCJWdWUiLCJvcHRpb25zIiwiY29tcG9uZW50IiwiaHR0cCIsImludGVyY2VwdG9ycyIsInB1c2giLCJyZXF1ZXN0IiwibmV4dCIsInJlc3BvbnNlIiwic3RhdHVzIiwiZmlsbCIsImJvZHkiLCJ1c2UiLCJlcnJvciIsImRhdGEiLCJlcnJvcnMiLCJQcm9taXNlIiwicmVqZWN0IiwibWl4aW4iLCJiZWZvcmVDcmVhdGUiLCIkb3B0aW9ucyIsIiRlcnJvcnMiLCJ1dGlsIiwiZGVmaW5lUmVhY3RpdmUiLCJjb21wdXRlZCJdLCJtYXBwaW5ncyI6IkFBQUEsT0FBT0EsVUFBUCxNQUF1QixjQUF2QjtBQUNBLE9BQU9DLGNBQVAsTUFBMkIsc0JBQTNCO0FBQ0EsT0FBT0MsS0FBUCxNQUFrQixPQUFsQjs7QUFFQSxNQUFNQyxTQUFOLENBQWdCO0FBQ2RDLFVBQVNDLEdBQVQsRUFBY0MsVUFBVSxFQUF4QixFQUE0QjtBQUMxQkQsUUFBSUUsU0FBSixDQUFjLE9BQWQsRUFBdUJOLGNBQXZCO0FBQ0EsUUFBSUksSUFBSUcsSUFBUixFQUFjO0FBQ1pILFVBQUlHLElBQUosQ0FBU0MsWUFBVCxDQUFzQkMsSUFBdEIsQ0FBMkIsQ0FBQ0MsT0FBRCxFQUFVQyxJQUFWLEtBQW1CO0FBQzVDQSxhQUFLQyxZQUFZO0FBQ2YsY0FBSUEsU0FBU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AgICAgICAgLy9lcnJvcnNcbiAgICAgICAgdGhpcy4kb3B0aW9ucy4kZXJyb3JzID0ge307XG4gICAgICAgIFZ1ZS51dGlsLmRlZmluZVJlYWN0aXZlKHRoaXMuJG9wdGlvbnMsICckZXJyb3JzJywgTFZhbGlkYXRvcik7XG4gICAgICAgIGlmICghdGhpcy4kb3B0aW9ucy5jb21wdXRlZCkge1xuICAgICAgICAgIHRoaXMuJG9wdGlvbnMuY29tcHV0ZWQgPSB7fVxuICAgICAgICB9XG4gICAgICAgIHRoaXMuJG9wdGlvbnMuY29tcHV0ZWRbXCIkZXJyb3JzXCJdID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzLiRvcHRpb25zLiRlcnJvcnM7XG4gICAgICAgIH07XG4gICAgICB9LFxuXG4gICAgfSlcblxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IG5ldyBWYWxpZGF0b3IoKVxuZXhwb3J0IHsgTFZhbGlkYXRvciB9XG4iXX0=

@@ -1,36 +0,110 @@

class LValidator{constructor(){this.errors={},this.busy=!1,this.success=!1}/**
class LValidator {
constructor() {
this.errors = {};
this.busy = false;
this.success = false;
}
/**
* Missed field method
* @param {string|null} field
*/missed(a=null){return!this.has(a)}/**
*/
missed(field = null) {
return !this.has(field);
}
/**
* Missed field method
* @param {string|null} field
*/nullState(a=null){return this.has(a)?!this.has(a):null}/**
*/
nullState(field = null) {
return this.has(field) ? !this.has(field) : null;
}
/**
* Check if field has any error
* @param {string} key
* @return {boolean}
*/has(a){return this.errors[a]!==void 0}/**
*/
has(key) {
return this.errors[key] !== undefined;
}
/**
* Get first error message by key
* @param {string} key
* @return {*}
*/first(a){return this.has(a)?this.errors[a][0]:null}/**
*/
first(key) {
if (this.has(key)) {
return this.errors[key][0];
}
return null;
}
/**
* Get all errors by key
* @param {string} key
* @return {*}
*/get(a){if(this.has(a))return this.errors[a]}/**
*/
get(key) {
if (this.has(key)) {
return this.errors[key];
}
}
/**
* Get all errors
* @return {{}}
*/all(){return this.errors}/**
*/
all() {
return this.errors;
}
/**
* Fill errors object
* @param values
*/fill(a){this.errors=a}/**
*/
fill(values) {
this.errors = values;
}
/**
* Clear all errors
*/flush(){this.errors={}}/**
*/
flush() {
this.errors = {};
}
/**
* Clear one or all error fields.
*
* @param {String|undefined} field
*/clear(a){const b={};a&&Object.keys(this.errors).forEach(c=>{c!==a&&(b[c]=this.errors[c])}),this.fill(b)}/**
*/
clear(field) {
const errors = {};
if (field) {
Object.keys(this.errors).forEach(key => {
if (key !== field) {
errors[key] = this.errors[key];
}
});
}
this.fill(errors);
}
/**
* Clear errors on keydown.
*
* @param {KeyboardEvent} event
*/onKeydown(a){const{name:b}=a.target;b&&this.clear(b)}}export default new LValidator;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9MVmFsaWRhdG9yLmpzIl0sIm5hbWVzIjpbIkxWYWxpZGF0b3IiLCJjb25zdHJ1Y3RvciIsImVycm9ycyIsImJ1c3kiLCJzdWNjZXNzIiwibWlzc2VkIiwiZmllbGQiLCJoYXMiLCJudWxsU3RhdGUiLCJrZXkiLCJmaXJzdCIsImdldCIsImFsbCIsImZpbGwiLCJ2YWx1ZXMiLCJmbHVzaCIsImNsZWFyIiwiT2JqZWN0Iiwia2V5cyIsImZvckVhY2giLCJvbktleWRvd24iLCJldmVudCIsIm5hbWUiLCJ0YXJnZXQiXSwibWFwcGluZ3MiOiJBQUFBLEtBQU1BLFdBQVcsQ0FDZkMsYUFBZSxDQUNiLEtBQUtDLE1BQUwsQ0FBYyxFQURELENBRWIsS0FBS0MsSUFBTCxHQUZhLENBR2IsS0FBS0MsT0FBTCxHQUNELENBRUQ7OztLQUlBQyxPQUFPQyxFQUFRLElBQWYsQ0FBcUIsQ0FDbkIsTUFBTyxDQUFDLEtBQUtDLEdBQUwsQ0FBU0QsQ0FBVCxDQUNULENBRUQ7OztLQUlBRSxVQUFVRixF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IHtcbiAgICAgICAgICBlcnJvcnNba2V5XSA9IHRoaXMuZXJyb3JzW2tleV1cbiAgICAgICAgfVxuICAgICAgfSlcbiAgICB9XG4gICAgdGhpcy5maWxsKGVycm9ycylcbiAgfVxuXG4gIC8qKlxuICAgKiBDbGVhciBlcnJvcnMgb24ga2V5ZG93bi5cbiAgICpcbiAgICogQHBhcmFtIHtLZXlib2FyZEV2ZW50fSBldmVudFxuICAgKi9cbiAgb25LZXlkb3duIChldmVudCkge1xuICAgIGNvbnN0IHsgbmFtZSB9ID0gZXZlbnQudGFyZ2V0XG4gICAgaWYgKG5hbWUpIHtcbiAgICAgIHRoaXMuY2xlYXIobmFtZSlcbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgbmV3IExWYWxpZGF0b3IoKVxuIl19
*/
onKeydown(event) {
const { name } = event.target;
if (name) {
this.clear(name);
}
}
}
export default new LValidator();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9MVmFsaWRhdG9yLmpzIl0sIm5hbWVzIjpbIkxWYWxpZGF0b3IiLCJjb25zdHJ1Y3RvciIsImVycm9ycyIsImJ1c3kiLCJzdWNjZXNzIiwibWlzc2VkIiwiZmllbGQiLCJoYXMiLCJudWxsU3RhdGUiLCJrZXkiLCJ1bmRlZmluZWQiLCJmaXJzdCIsImdldCIsImFsbCIsImZpbGwiLCJ2YWx1ZXMiLCJmbHVzaCIsImNsZWFyIiwiT2JqZWN0Iiwia2V5cyIsImZvckVhY2giLCJvbktleWRvd24iLCJldmVudCIsIm5hbWUiLCJ0YXJnZXQiXSwibWFwcGluZ3MiOiJBQUFBLE1BQU1BLFVBQU4sQ0FBaUI7QUFDZkMsZ0JBQWU7QUFDYixTQUFLQyxNQUFMLEdBQWMsRUFBZDtBQUNBLFNBQUtDLElBQUwsR0FBWSxLQUFaO0FBQ0EsU0FBS0MsT0FBTCxHQUFlLEtBQWY7QUF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GFsbCBlcnJvcnNcbiAgICovXG4gIGZsdXNoICgpIHtcbiAgICB0aGlzLmVycm9ycyA9IHt9XG4gIH1cblxuICAvKipcbiAgICogQ2xlYXIgb25lIG9yIGFsbCBlcnJvciBmaWVsZHMuXG4gICAqXG4gICAqIEBwYXJhbSB7U3RyaW5nfHVuZGVmaW5lZH0gZmllbGRcbiAgICovXG4gIGNsZWFyIChmaWVsZCkge1xuICAgIGNvbnN0IGVycm9ycyA9IHt9XG4gICAgaWYgKGZpZWxkKSB7XG4gICAgICBPYmplY3Qua2V5cyh0aGlzLmVycm9ycykuZm9yRWFjaChrZXkgPT4ge1xuICAgICAgICBpZiAoa2V5ICE9PSBmaWVsZCkge1xuICAgICAgICAgIGVycm9yc1trZXldID0gdGhpcy5lcnJvcnNba2V5XVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH1cbiAgICB0aGlzLmZpbGwoZXJyb3JzKVxuICB9XG5cbiAgLyoqXG4gICAqIENsZWFyIGVycm9ycyBvbiBrZXlkb3duLlxuICAgKlxuICAgKiBAcGFyYW0ge0tleWJvYXJkRXZlbnR9IGV2ZW50XG4gICAqL1xuICBvbktleWRvd24gKGV2ZW50KSB7XG4gICAgY29uc3QgeyBuYW1lIH0gPSBldmVudC50YXJnZXRcbiAgICBpZiAobmFtZSkge1xuICAgICAgdGhpcy5jbGVhcihuYW1lKVxuICAgIH1cbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBuZXcgTFZhbGlkYXRvcigpXG4iXX0=

2

package.json
{
"name": "laravel-vue2-validator",
"version": "0.0.9-beta-11",
"version": "0.0.9-beta-13",
"description": " Simple package to display error in vue from laravel validation",

@@ -5,0 +5,0 @@ "main": "src/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc