Hi there,
i encountered a misleading documentation with the validation of a "number" property in Scripter 2020. I also found it was present in previous version (2019 at least)
:
Number : Is non-empty and contains only decimal digits
In fact, you can only type a positive integer number : no negative, no float.
But if you pass a float or a negative using a variable or a script, it work!
number and validating property
-
- Member
- Posts: 21
- Joined: Wed Jul 20, 2016 12:03 pm
Re: number and validating property
The behavior you describe has always been like that. If you want to allow negative number and/or floats during flow design (that is different than at execution time), you should choose "Single-line text" in combination with "Validation - Custom". In the entry point isPropertyValid (legacy) or in validateProperties (Node.js) you then use a regular expression to validate the user's input.