You need to sign in to do that
Don't have an account?

regex for allowing number between 1 and 999999
Hey there im creating a webform with visual workflow
There is this field where i need the attentant to fill in a number between 1 and 999999 there should be no spaces allowed. so input 12 435 should not be allowed
Does anyone know the correct Regex for this in visual workflow ?
{!Test_number} < 1000000 && {!Test_number} > 0
2) If the field is of type text, just prevent the beginning of this text with a zero.
NOT(BEGINS("0",{!test_text})) && REGEX({!test_text},"[0-9]{1,6}")
One to six figures only ( [0-9]{1,6} ) and cannot begin with zero ( NOT(BEGINS("0",{!test_text})) )
Alain
All Answers
I would suggest go with validation rule to validate field value is number and belongs to range.
you can use ISNUMBER() to validate.
{!Test_number} < 1000000 && {!Test_number} > 0
2) If the field is of type text, just prevent the beginning of this text with a zero.
NOT(BEGINS("0",{!test_text})) && REGEX({!test_text},"[0-9]{1,6}")
One to six figures only ( [0-9]{1,6} ) and cannot begin with zero ( NOT(BEGINS("0",{!test_text})) )
Alain
Hey Alain,
Thanks for your accurate answer, that really helps :)