I have an object of type TValueListEditor that contains certain function parameters in the Key column and input for the corresponding column of value to test the function. I added an Edit Mask to enter a value depending on the type of data that should be a parameter. For example, the parameter Num1 is of type int, so the input should be only a number, but since I do not know the exact number of digits in advance, is there a way to specify EditMask without a fixed character length?
If you look at the code below, if I need a value of type float, I must have a point, but I do not want the point to be predetermined at that exact position.
if parser.sParams.Values[parser.sParams.Names[i]]='float' then begin lstValParamValues.ItemProps[parser.sParams.Names[i]].EditMask:='#########.#'; end
Maybe I need to implement something like regex in EditMask? Or is there another way to implement value input validation?
source share