Need a number field with a minimum value of 0 or 1 and the length should be 9. I don't know if this is achievable with number field. The reason is that I don't want users to enter any negative value (-1233). and we don't want the number value to have any decimal or delimiter(123,456). All we need is (0123456789). Really need help with this. Any idea
Hello,
You would need a plugin for it.
There are 2 way to implement it with plugins:
1. You can use plugins like Power Scripts or ScriptRunner to implement a validator for the field.
If you want to use the Power Script app, then the code for validator would look like this:
string str = #{Your custom field name};
if (#{Your custom field name} < 0 or lenght(str) > 9) {
return false, "This custom field my be positive with the length less than 9 symbols"
}
return true;
2. You could use plugins, which will let you create a custom field and check for validity. For example, you could use the Power Custom Field Premium add-on.
You would create a regex field with a regex expression like this:
^\d{9}$
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.