Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Validation script that looks for a specific number

Not applicable
We have a form that in one of it's field you can enter phone number.

We want a script that checks that the first digit entered is 0.If another digit is being entered a pop up message will appear that the digit entered is not correct.

What is the script in order to achieve this ?
3 Replies
Level 5
Level 5
Drop this FormCalc code in 'exit' event of the field.

var FirstDig

FirstDig = Left($.rawValue, 1)

if (FirstDig <> 0) then"Please check the number. Phone number has to start with '0'.")


Good luck,

Level 2
Level 2

Fantastic, I was trying to force users to only insert urls from my domain and this worked a treat!

Cheers mate...




= Left($.rawValue, 20)


(FirstDig <> "") then"Please use, files are more secure there!")


= null