number and validating property

Post Reply
Posts: 21
Joined: Wed Jul 20, 2016 12:03 pm

number and validating property

Post by ThomasDeschamps » Tue Oct 27, 2020 10:53 am

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!

Advanced member
Posts: 572
Joined: Thu Feb 09, 2012 3:53 pm

Re: number and validating property

Post by freddyp » Tue Oct 27, 2020 5:47 pm

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.

Post Reply