Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

styled : validation decorators markdown formalization #2446

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -813,13 +813,13 @@ isBoolean(value);
| `@IsInt()` | Checks if the value is an integer number. |
| `@IsArray()` | Checks if the value is an array |
| `@IsEnum(entity: object)` | Checks if the value is a valid enum |
| **Number validation decorators** |
| **Number validation decorators** | |
| `@IsDivisibleBy(num: number)` | Checks if the value is a number that's divisible by another. |
| `@IsPositive()` | Checks if the value is a positive number greater than zero. |
| `@IsNegative()` | Checks if the value is a negative number smaller than zero. |
| `@Min(min: number)` | Checks if the given number is greater than or equal to given number. |
| `@Max(max: number)` | Checks if the given number is less than or equal to given number. |
| **Date validation decorators** |
| **Date validation decorators** | |
| `@MinDate(date: Date \| (() => Date))` | Checks if the value is a date that's after the specified date. |
| `@MaxDate(date: Date \| (() => Date))` | Checks if the value is a date that's before the specified date. |
| **String-type validation decorators** | |
Expand Down Expand Up @@ -908,7 +908,7 @@ isBoolean(value);
| `@ArrayMinSize(min: number)` | Checks if the array's length is greater than or equal to the specified number. |
| `@ArrayMaxSize(max: number)` | Checks if the array's length is less or equal to the specified number. |
| `@ArrayUnique(identifier?: (o) => any)` | Checks if all array's values are unique. Comparison for objects is reference-based. Optional function can be speciefied which return value will be used for the comparsion. |
| **Object validation decorators** |
| **Object validation decorators** | |
| `@IsInstance(value: any)` | Checks if the property is an instance of the passed value. |
| **Other decorators** | |
| `@Allow()` | Prevent stripping off the property when no other constraint is specified for it. |
Expand Down