# ng-form-validator-builder

> Adds easy to use Validators on different base types to be used with angular (reactive) forms

Latest version **19.0.6** (published 2025-01-03) · 0 weekly downloads

## Install

```sh
npm install ng-form-validator-builder
pnpm add ng-form-validator-builder
yarn add ng-form-validator-builder
bun add ng-form-validator-builder
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 19.0.6 |
| Published | 2025-01-03 |
| First published | 2020-11-18 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 99.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Johan Aspeling |
| Maintainers | jaspeling |
| Keywords | angular, validation, builder, forms, form builder |

## Links

- npm: https://www.npmjs.com/package/ng-form-validator-builder
- Repository: https://github.com/JAspeling/ng-form-validator
- Homepage: http://jaspeling.github.io/ng-form-validator
- Issues: https://github.com/JAspeling/ng-form-validator/issues
- npm.io page: https://npm.io/package/ng-form-validator-builder

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## Alternatives

- [@libsql/sqlite3](https://npm.io/package/@libsql/sqlite3.md) — 39.8K weekly downloads
- [@fortemi/core](https://npm.io/package/@fortemi/core.md) — 461 weekly downloads
- [cdb-converter](https://npm.io/package/cdb-converter.md) — 341 weekly downloads
- [@uplo/adapter-prisma](https://npm.io/package/@uplo/adapter-prisma.md) — 75 weekly downloads
- [typeorm-aios](https://npm.io/package/typeorm-aios.md) — 30 weekly downloads

## Recent versions

- 19.0.6 (latest) — 2025-01-03
- 18.2.12 — 2025-01-03
- 17.3.11 — 2025-01-03
- 16.2.16 — 2025-01-03
- 15.2.11 — 2025-01-03
- 14.2.13 — 2025-01-03
- 13.4.0 — 2025-01-03
- 12.2.18 — 2025-01-02
- 11.2.20 — 2025-01-02
- 10.1.8 — 2024-04-09
- 10.1.11 — 2023-05-24
- 10.1.9 — 2023-05-24
- 10.1.7 — 2021-12-18
- 10.1.5 — 2021-12-18
- 0.0.11 — 2021-01-19
- … 8 more at https://npm.io/package/ng-form-validator-builder/versions

## README

# Validation Builder

Built with one purpose - Make Reactive form validation in Angular easier to use.

- [Validation Builder](#validation-builder)
  - [- Extending validators](#--extending-validators)
- [Getting started](#getting-started)
  - [Install the library](#install-the-library)
  - [Start using the validators](#start-using-the-validators)
- [Combining Validators](#combining-validators)
- [How it works behind the scenes](#how-it-works-behind-the-scenes)
- [Extending validators](#extending-validators)

---

# Getting started

Take a look at [the live demo](https://jaspeling.github.io/ng-form-validator/) to play around with the validators

## Install the library

```powershell
npm i ng-form-validator-builder
```

## Start using the validators

You can add validators using the formBuilder to create a form:

```typescript
const nextWeek: Date = new Date();
nextWeek.setDate(new Date().getDate() + 7);

const form = new FormBuilder().group({
    someDate: [new Date(), DateValidator.isBefore(nextWeek),
    anotherDate: [new Date(), DateValidator.isBefore(nextWeek, 'With a custom error message'),
});
```

---

# Combining Validators

TODO: Add documentation here

---

# How it works behind the scenes

TODO: Add documentation on how the validators work with the builders.

---

# Extending validators

TODO: Add documentation on extending validation builders to create custom validators and extend on existing validators.

---
_Source: https://npm.io/package/ng-form-validator-builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
