Skip to content

Commit

Permalink
Merge pull request #125 from nobrainr/fix/expose-validation-error-class
Browse files Browse the repository at this point in the history
fix: expose ValidationError class
  • Loading branch information
emyann authored Sep 1, 2019
2 parents 9b72ae5 + 51a6c5c commit 8dd3889
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/morphism.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import Morphism, {
SchemaOptions,
SCHEMA_OPTIONS_SYMBOL,
reporter,
Validation
Validation,
ValidationError
} from './morphism';
import { User, MockData } from './utils-test';
import { ActionSelector, ActionAggregator } from './types';
import { defaultFormatter, ValidationError } from './validation/reporter';
import { defaultFormatter } from './validation/reporter';

describe('Morphism', () => {
const dataToCrunch: MockData[] = [
Expand Down
12 changes: 10 additions & 2 deletions src/morphism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import { Schema, StrictSchema, Constructable, SourceFromSchema, Mapper, Destinat
import { MorphismSchemaTree, createSchema, SchemaOptions } from './MorphismTree';
import { MorphismRegistry, IMorphismRegistry } from './MorphismRegistry';
import { decorator } from './MorphismDecorator';
import { Reporter, reporter as defaultReporter, Formatter, targetHasErrors, ValidationErrors } from './validation/reporter';
import {
Reporter,
reporter as defaultReporter,
Formatter,
targetHasErrors,
ValidationErrors,
ValidationError
} from './validation/reporter';
import { BaseValidator, Rule, Validation } from './validation/Validation';

/**
Expand Down Expand Up @@ -250,6 +257,7 @@ export {
Formatter,
Validation,
BaseValidator,
Rule
Rule,
ValidationError
};
export default Morphism;

0 comments on commit 8dd3889

Please sign in to comment.