-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mango): synchronous validator api
- Loading branch information
1 parent
e74cfbb
commit 6731ef8
Showing
6 changed files
with
216 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* @file Global Test Fixture - Error | ||
* @module tests/fixtures/error | ||
*/ | ||
|
||
export default new Error('Test error') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/mixins/__tests__/__fixtures__/validation-errors.fixture.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { ValidationError } from 'class-validator' | ||
|
||
/** | ||
* @file Test Fixture - ValidationError[] | ||
* @module mixins/tests/fixtures/validation-errors.fixture | ||
*/ | ||
|
||
export default [ | ||
{ | ||
constraints: { | ||
length: '$property must be longer than or equal to 10 characters' | ||
}, | ||
property: 'title', | ||
value: 'Hello' | ||
}, | ||
{ | ||
constraints: { | ||
contains: 'text must contain a hello string' | ||
}, | ||
property: 'text', | ||
value: 'this is a great post about hell world' | ||
} | ||
] as ValidationError[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters