# @galaxyops/validation-schemas

> Contains standard class-validator decorators and custom decorators for use primarily in defining and validating data used in game design.

Latest version **2.3.0** (published 2024-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @galaxyops/validation-schemas
pnpm add @galaxyops/validation-schemas
yarn add @galaxyops/validation-schemas
bun add @galaxyops/validation-schemas
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2024-12-12 |
| First published | 2024-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 63.1 KB |
| Known vulnerabilities | 0 (+4 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 12 |
| Maintainers | hxtree |

## Links

- npm: https://www.npmjs.com/package/@galaxyops/validation-schemas
- Repository: https://github.com/hxtree/galaxyops
- Homepage: https://github.com/hxtree/galaxyops#readme
- Issues: https://github.com/hxtree/galaxyops/issues
- npm.io page: https://npm.io/package/@galaxyops/validation-schemas

## Dependencies (10)

- [uuid](https://npm.io/package/uuid.md) ~9.0.1
- [lodash](https://npm.io/package/lodash.md) 4.17.21
- [currency.js](https://npm.io/package/currency.js.md) ~2.0.4
- [openapi3-ts](https://npm.io/package/openapi3-ts.md) ~3.1.2
- [@types/lodash](https://npm.io/package/@types/lodash.md) 4.17.6
- [class-validator](https://npm.io/package/class-validator.md) 0.13.2
- [@types/validator](https://npm.io/package/@types/validator.md) ~13.7.10
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) 0.1.13
- [class-transformer](https://npm.io/package/class-transformer.md) 0.5.1
- [@galaxyops/base-nodejs](https://npm.io/package/@galaxyops/base-nodejs.md) 0.2.0

## Recent versions

- 2.3.0 (latest) — 2024-12-12
- 2.2.0 — 2024-10-01
- 2.1.0 — 2024-07-22

## README

# @galaxyops/validation-schemas

Contains standard class-validator decorators and custom decorators for use
primarily in defining and validating data used in game design.

```typescript
import {
  validateSync,
  ValidationError,
  IsDiceNotation,
} from '@galaxyops/validation-schemas';

class Turn {
  @IsDiceNotation()
  public diceNotation: string;
}

let turn = new Turn();
turn.diceNotation = '1d6+4';

const errors: ValidationError[] = validateSync(testClass);

// outputs 0
console.log(errors.length);
```

All validation decorators should be supported by
[@galaxyops/faker-factory](https://www.npmjs.com/package/@galaxyops/faker-factory)
enabling automatic generation of fakes.

## References

- [validatorjs](https://validatejs.org/)
- [class-validator](https://github.com/typestack/class-validator)

---
_Source: https://npm.io/package/@galaxyops/validation-schemas · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
