Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qavajs/validation
Lib that transform plain english definition to validation functions
https://github.com/qavajs/validation
qa test-automation testing
Last synced: 2 days ago
JSON representation
Lib that transform plain english definition to validation functions
- Host: GitHub
- URL: https://github.com/qavajs/validation
- Owner: qavajs
- License: mit
- Created: 2022-07-14T13:08:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-06T09:43:59.000Z (3 months ago)
- Last Synced: 2024-11-08T03:07:15.154Z (7 days ago)
- Topics: qa, test-automation, testing
- Language: TypeScript
- Homepage:
- Size: 197 KB
- Stars: 17
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @qavajs/validation
`npm install @qavajs/validation`
@qavajs library that transforms plain english definition to validation functions
Lib supports following validations:
* equal - not strict equal (==)
* strictly equal - strict equal (===)
* deeply equal - deep equal (chai eql)
* contain - contain a substring
* match - match a regular expression
* above / greater than - greater than
* below / less than - less than
* have type - type validation
* have members - validation if array/object have exact members
* include members - validation if array/object includes members
* have property - have property validation
* match schema - match [ajv](https://www.npmjs.com/package/ajv) schema
* case insensitive equal - not strict equal (==) with casting to lower caseAll validations can be negated adding _not_ word.
## Test
`npm run test`