Pro onlyChange the interval in which a number is generated
The number generator in Fake Data offers you a quick way to generate a random number. By default, the generated number is between 0 and 666.
In order to change the default interval, follow these steps:
- Open Fake Data's options page
- Go to Generators -> Default Generators tab
- Find the
numbergenerator, and click on the manage icon:
- On the newly opened popup, under
- Once you enable that setting, you will be able to type a minimum and a maximum value for the desired interval.
- When finished with the selection, press Done. Also make sure to save changes on the generators page.
If you are filling an input of type
number and that input has a
max attribute set, then those attributes will have a higher priority over the interval you set unless your custom interval are respecting the two attributes mentioned.
For example, the following input
<input type="number" min="5" max="10"> will allow numbers between 5 and 10. For this input you can only set a custom interval in Fake Data between those two values, otherwise they will be ignored.
Doing the steps described above, will change the setting for all fields that are using the generator you updated. You can also change this setting only for a single field, either through the Fields page, or by clicking on the "Manage Field" option from the context menu.