I have a custom field name "Relative Business value" , number field. Acceptance criteria for this field is , it has a number range between 1-100 and integers only. I have used a simple scripted validator to set the range, I have tried few regex codes to make it integer but it didnt work. Can you help me to restrict the field to integer?
Hi @Florian Bonniec my simple scripted validator is as follows:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think it's because with a number field even if you input an integer it will be store as double. So if you input 90, it will store 90.0.
You could use a regex to take that into account (^(?:100(?:\.0)?|\d{1,2}(?:\.0)?)$) or use another field type.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why not a select list with just 1-100 values?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, but wanted to try a simple script that makes the user job easy to punch in the number rather than searching for the number from the big drop down list @Joe Pitt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.