text: 'use strict';var _createClass=require('babel-runtime/helpers/create-class')['default'];var _classCallCheck=require('babel-runtime/helpers/class-call-check')['default'];var _Object$keys=require('babel-runtime/core-js/object/keys')['default'];Object.defineProperty(exports,'__esModule',{value:true});var ValidationPropertyError=(function(){function ValidationPropertyError(property,type){var message=arguments.length <= 2 || arguments[2] === undefined?'':arguments[2];_classCallCheck(this,ValidationPropertyError);type = type.toUpperCase();if(!ValidationPropertyError.typeExists(type)){throw new Error('ValidationError: unknown type ' + type);}Object.defineProperty(this,'type',{value:type,enumerable:true,writable:false,configurable:false});message = message || ValidationPropertyError.getDefaultMessage(type);Object.defineProperty(this,'message',{value:message,enumerable:true,writable:false,configurable:false});Object.defineProperty(this,'property',{value:property,enumerable:true,writable:false,configurable:false});}_createClass(ValidationPropertyError,null,[{key:'getDefaultMessage',value:function getDefaultMessage(type){return ValidationPropertyError.TYPES[type] || '';}},{key:'typeExists',value:function typeExists(type){return _Object$keys(ValidationPropertyError.TYPES).indexOf(type) > -1;}}]);return ValidationPropertyError;})();exports['default'] = ValidationPropertyError;Object.defineProperty(ValidationPropertyError,'TYPES',{enumerable:false,writable:false,configurable:false,value:{'REQUIRED':'validation.error.required','UNIQUE':'validation.error.unique','FORMAT':'validation.error.format','BUSINESS':'validation.error.business'}});module.exports = exports['default'];
  //# sourceMappingURL=ValidationPropertyError.js.map