Validate a field which accept 0,1,2,3,4,5,6

Certified Senior Developer

HI Team,

I stuck on feild validation which will accept only below combination:

it can be 

0,1,2,3,4,5,6

or 0,1 or 1,2 combinations with all numbers or it can be only value which is less than 6 

I am able to achieve with below code

a!isNullOrEmpty(
stripwith(
ri!GBL_AutoCaseRunTimeConfig.config_value,
"0123456,"
)
)

but 

if user enters like 1,2,,,,,,, or 1,2,25 this is accepting , because it is under stripwith value i have added,  how can we validate ?

might be to use split with comma and use contains functions and also how we can remove comma at last ?

Any good suggestions ?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to Harshit Bumb (Appyzie)

    I use a freeware tool called Greenshot - i have it mapped to my "printscreen" key (key bindings are fully editable), where the keypress immediately brings up a region-selection tool

    and after selecting the region i want, it immediately opens a compact editor, with quick access to features like drawing, highlighting, obfuscating (blur or pixellate), adding a clean border or "torn edge" border...

    (you probably don't need to guess which one i like doing more often, lol...)

    And when done editing, you just press "copy" if you don't want to mess with saving the file somewhere (though that's also made easy), and can paste directly here.

    The one thing it doesn't do that I sometimes miss is small video snippets.  But I like the rest of it well enough that I really can't complain.