Zip Code validation

Got a problem you cannot solve? Try here.
Post Reply
swarovski
Posts: 109
Joined: Mon Apr 16, 2007 8:32 pm

Zip Code validation

Post by swarovski »

I want to write some simple scripts to validate Zip Code on a dialog.

I have set the max length = 5

Which functions should I use to allow user only input digit?

Thanks in advance!
swarovski
Posts: 109
Joined: Mon Apr 16, 2007 8:32 pm

Re: Zip Code validation

Post by swarovski »

swarovski wrote:I want to write some simple scripts to validate Zip Code on a dialog.

I have set the max length = 5

Which functions should I use to allow user only input digit?

Thanks in advance!
I have given up the validation.
And currently using a mask edit box.
prevent user from input letters..
swarovski
Posts: 109
Joined: Mon Apr 16, 2007 8:32 pm

Post by swarovski »

_regValidateZipCode = $_regZipCode$ + 0
if Variable _regValidateZipCode Equals
Set Variable _regValidateResult to $_regValidateResult$$NEWLINE$- Zip Code <invalid>
end

I am glad I found this method.
main idea is using mathematics function.
a valid number will always return a number
else will return empty string
Post Reply