Skip to content

Commit b3f1237

Browse files
committed
Fixed the documentation
1 parent fcb7392 commit b3f1237

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

β€Ždocs/rules.mdβ€Ž

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ isBoolean(true);
476476

477477
## `confirmed`
478478

479-
The field under validation must have a matching field of `foo_confirmation`. For example, if the field under validation is `password`, a matching `password_confirmation` field must be present in the input.
479+
The field under validation must have a matching field of `foo_confirmed`. For example, if the field under validation is `password`, a matching `password_confirmed` field must be present in the input.
480480

481481
Let's assume that the value of the `password` field is `123456`. If you use the `confirmed` definition on the `password` field's rules, the truth table would look like the following example:
482482

@@ -502,15 +502,15 @@ isConfirmed("your-data");
502502

503503
:::
504504

505-
| Field | Value | Is valid? |
506-
| ----------------------- | ----------- | --------- |
507-
| `password_confirmation` | `123456` | 🟒 |
508-
| `password_confirmation` | `654321` | πŸ”΄ |
509-
| `password_confirmation` | `null` | πŸ”΄ |
510-
| `password_confirmation` | `undefined` | πŸ”΄ |
511-
| `password_confirmation` | `true` | πŸ”΄ |
512-
| `password_confirmation` | `false` | πŸ”΄ |
513-
| `password_confirmation` | `{}` | πŸ”΄ |
505+
| Field | Value | Is valid? |
506+
| -------------------- | ----------- | --------- |
507+
| `password_confirmed` | `123456` | 🟒 |
508+
| `password_confirmed` | `654321` | πŸ”΄ |
509+
| `password_confirmed` | `null` | πŸ”΄ |
510+
| `password_confirmed` | `undefined` | πŸ”΄ |
511+
| `password_confirmed` | `true` | πŸ”΄ |
512+
| `password_confirmed` | `false` | πŸ”΄ |
513+
| `password_confirmed` | `{}` | πŸ”΄ |
514514

515515
## `date:format`
516516

β€Žsrc/converters/confirmed.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* The field under validation must have a matching field of foo_confirmation.
2+
* The field under validation must have a matching field of foo_confirmed.
33
* For example, if the field under validation is password, a matching
4-
* password_confirmation field must be present in the input.
4+
* password_confirmed field must be present in the input.
55
*
66
* @example
77
* import { confirmed } from "robust-validator"

0 commit comments

Comments
Β (0)