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-8 to 0.0.9-beta-9

4

dist/index.js

@@ -1,2 +0,2 @@

'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.LValidator=void 0;var _createClass=function(){function defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(a,b,c){return b&&defineProperties(a.prototype,b),c&&defineProperties(a,c),a}}(),_LValidator=require('./LValidator'),_LValidator2=_interopRequireDefault(_LValidator),_ErrorComponent=require('./ErrorComponent.vue'),_ErrorComponent2=_interopRequireDefault(_ErrorComponent),_axios=require('axios'),_axios2=_interopRequireDefault(_axios);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var Validator=function(){function Validator(){_classCallCheck(this,Validator)}return _createClass(Validator,[{key:'install',value:function install(a){1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};a.component('error',_ErrorComponent2.default),a.http&&a.http.interceptors.push(function(a,b){b(function(a){422===a.status&&_LValidator2.default.fill(a.body)})}),_axios2.default&&_axios2.default.interceptors.response.use(function(a){return a},function(a){var b=a.response,c=a.data,d=b.status;return 422===d&&_LValidator2.default.fill(c.errors),Promise.reject(a)}),a.mixin({beforeCreate:function beforeCreate(){this.$options.$errors={},a.util.defineReactive(this.$options,'$errors',_LValidator2.default),this.$options.computed||(this.$options.computed={}),this.$options.computed.$errors=function(){return this.$options.$errors}}})}}]),Validator}();exports.default=new Validator,exports.LValidator=_LValidator2.default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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JldHVybiB0aGlzLiRvcHRpb25zLiRlcnJvcnM7XG4gICAgICAgIH07XG4gICAgICB9LFxuXG4gICAgfSlcblxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IG5ldyBWYWxpZGF0b3IoKVxuZXhwb3J0IHsgTFZhbGlkYXRvciB9XG4iXX0=
'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.LValidator=void 0;var _createClass=function(){function defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(a,b,c){return b&&defineProperties(a.prototype,b),c&&defineProperties(a,c),a}}(),_LValidator=require('./LValidator'),_LValidator2=_interopRequireDefault(_LValidator),_ErrorComponent=require('./ErrorComponent.vue'),_ErrorComponent2=_interopRequireDefault(_ErrorComponent),_axios=require('axios'),_axios2=_interopRequireDefault(_axios);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var Validator=function(){function Validator(){_classCallCheck(this,Validator)}return _createClass(Validator,[{key:'install',value:function install(a){1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};a.component('error',_ErrorComponent2.default),a.http&&a.http.interceptors.push(function(a,b){b(function(a){422===a.status&&_LValidator2.default.fill(a.body)})}),_axios2.default&&_axios2.default.interceptors.response.use(function(a){return a},function(a){return 422===a.response.status&&_LValidator2.default.fill(a.response.data.errors),Promise.reject(a)}),a.mixin({beforeCreate:function beforeCreate(){this.$options.$errors={},a.util.defineReactive(this.$options,'$errors',_LValidator2.default),this.$options.computed||(this.$options.computed={}),this.$options.computed.$errors=function(){return this.$options.$errors}}})}}]),Validator}();exports.default=new Validator,exports.LValidator=_LValidator2.default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcy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kYXRvci5maWxsKHJlc3BvbnNlLmJvZHkpXG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICAgIH1cbiAgICBpZiAoYXhpb3MpIHtcbiAgICAgIGF4aW9zLmludGVyY2VwdG9ycy5yZXNwb25zZS51c2UoKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgIHJldHVybiByZXNwb25zZTtcbiAgICAgIH0sIChlcnJvcikgPT4ge1xuICAgICAgICBpZiAoZXJyb3IucmVzcG9uc2Uuc3RhdHVzID09PSA0MjIpIHtcbiAgICAgICAgICBMVmFsaWRhdG9yLmZpbGwoZXJyb3IucmVzcG9uc2UuZGF0YS5lcnJvcnMpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KGVycm9yKTtcbiAgICAgIH0pO1xuICAgIH1cbiAgICBWdWUubWl4aW4oe1xuICAgICAgYmVmb3JlQ3JlYXRlICgpIHtcbiAgICAgICAgLy9lcnJvcnNcbiAgICAgICAgdGhpcy4kb3B0aW9ucy4kZXJyb3JzID0ge307XG4gICAgICAgIFZ1ZS51dGlsLmRlZmluZVJlYWN0aXZlKHRoaXMuJG9wdGlvbnMsICckZXJyb3JzJywgTFZhbGlkYXRvcik7XG4gICAgICAgIGlmICghdGhpcy4kb3B0aW9ucy5jb21wdXRlZCkge1xuICAgICAgICAgIHRoaXMuJG9wdGlvbnMuY29tcHV0ZWQgPSB7fVxuICAgICAgICB9XG4gICAgICAgIHRoaXMuJG9wdGlvbnMuY29tcHV0ZWRbXCIkZXJyb3JzXCJdID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzLiRvcHRpb25zLiRlcnJvcnM7XG4gICAgICAgIH07XG4gICAgICB9LFxuXG4gICAgfSlcblxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IG5ldyBWYWxpZGF0b3IoKVxuZXhwb3J0IHsgTFZhbGlkYXRvciB9XG4iXX0=
{
"name": "laravel-vue2-validator",
"version": "0.0.9-beta-8",
"version": "0.0.9-beta-9",
"description": " Simple package to display error in vue from laravel validation",

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

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