form-backend-validation
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -5,2 +5,6 @@ # Changelog | ||
## 1.5.1 - 2017-07-17 | ||
- Added: Can now import `Errors` directly as a separate module | ||
- Added: `Errors` can now accept an object of errors. | ||
## 1.5.0 - 2017-05-19 | ||
@@ -7,0 +11,0 @@ - Added: `options` parameter to `Form`. Currently accepts a `resetOnSuccess` option |
@@ -15,6 +15,6 @@ 'use strict'; | ||
*/ | ||
function Errors() { | ||
function Errors(errors) { | ||
_classCallCheck(this, Errors); | ||
this.errors = {}; | ||
this.errors = errors ? errors : {}; | ||
} | ||
@@ -21,0 +21,0 @@ |
@@ -16,2 +16,11 @@ 'use strict'; | ||
var _Errors = require('./Errors'); | ||
Object.defineProperty(exports, 'Errors', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_Errors).default; | ||
} | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
{ | ||
"name": "form-backend-validation", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "An easy way to validate forms using back end logic", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -5,4 +5,4 @@ class Errors { | ||
*/ | ||
constructor() { | ||
this.errors = {}; | ||
constructor(errors) { | ||
this.errors = errors ? errors : {}; | ||
} | ||
@@ -86,2 +86,2 @@ | ||
export default Errors; | ||
export default Errors; |
export { default as default } from './Form'; | ||
export { default as Errors } from './Errors'; |
Sorry, the diff of this file is not supported yet
508
137301