Hi Michael,
You could give this snippet a try. This validator only accepts positive integers. You would have to alter constant inputmask if you have other needs (like accepting negative integers, decimals etc.).
private function myValidator (input string in, constraints dictionary in) returns(string?) error string?; const inputmask string = "[0-9]+"; case when (!DojoLib.VALIDATORS.PatternValidator(input, inputMask)) error = "Invalid number"; when (strlib.characterLen(input) > 10) error = "Input has more than 9 digits"; end return (error); end
Regards,
Guus
gweis