@Age()
New in 2.0Generate ages
UserSince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| min | Integer | — | 1 | Minimum age, default 0 |
| max | Integer | — | 100 | Maximum age, default 100 |
Usage
@Age()Generate random age (0-100)
Example:
@String()
Output:
60@Age(min,max)Generate age between min and max
Example:
@String(1,50)
Output:
25