@@ -37,9 +37,9 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
3737
3838var _createClass3 = _interopRequireDefault ( _createClass2 ) ;
3939
40- var _i18n = require ( 'i18n-2' ) ;
40+ var _i18n2 = require ( 'i18n-2' ) ;
4141
42- var _i18n2 = _interopRequireDefault ( _i18n ) ;
42+ var _i18n3 = _interopRequireDefault ( _i18n2 ) ;
4343
4444var _path = require ( 'path' ) ;
4545
@@ -77,15 +77,17 @@ var TypeAny = exports.TypeAny = function () {
7777 } ) , ( 0 , _defineProperty3 . default ) ( _errorMessages , this . _TypeError . INVALID_TYPE , function ( ) {
7878 return _this . _i18n . __ ( 'Expected type %s' , _this . _type ) ;
7979 } ) , ( 0 , _defineProperty3 . default ) ( _errorMessages , this . _TypeError . INVALID_VALUE , function ( ) {
80- return _this . _i18n . __ ( 'Invalid field' ) ;
80+ return _this . _getErrorInvalidValue . apply ( _this , arguments ) ;
8181 } ) , _errorMessages ) ;
8282 this . _isRequired = false ;
8383 this . _notNull = false ;
8484 this . _default = undefined ;
8585 this . _value = null ;
8686
87- this . _getError = function ( ) {
88- return _this . _i18n . __ ( 'Invalid field' ) ;
87+ this . _getErrorInvalidValue = function ( _ref2 ) {
88+ var _i18n = _ref2 . _i18n ;
89+
90+ return _i18n . __ ( 'Invalid field' ) ;
8991 } ;
9092
9193 this . _getDescription = function ( ) {
@@ -100,14 +102,14 @@ var TypeAny = exports.TypeAny = function () {
100102 locales : [ 'en' , 'fr' ] ,
101103 extension : '.json'
102104 } , i18n ) ;
103- this . _i18n = new _i18n2 . default ( this . _i18nConfig ) ;
105+ this . _i18n = new _i18n3 . default ( this . _i18nConfig ) ;
104106 }
105107
106108 ( 0 , _createClass3 . default ) ( TypeAny , [ {
107109 key : 'clone' ,
108110 value : function clone ( ) {
109111 var clone = ( 0 , _assign2 . default ) ( ( 0 , _create2 . default ) ( ( 0 , _getPrototypeOf2 . default ) ( this ) ) , this ) ;
110- clone . _i18n = new _i18n2 . default ( this . _i18nConfig ) ;
112+ clone . _i18n = new _i18n3 . default ( this . _i18nConfig ) ;
111113 return clone ;
112114 }
113115 } , {
0 commit comments