View Full Version : String Validation & "Contains Not Letters In"
NewsArchive
11-24-2007, 08:16 AM
Ok, I have a variable, assigned by a dialog box, which I want to validate
before the user goes to the next dialog.
The input must be letters and numbers, no spaces or symbols, less than 15
characters in length.
the <15 was easy enough, but I cannot seem to get a valid test for the
characters in the string.
I have been trying to use "Contains Not Letters In" to create a failure, but
it doesn't work like I thought it would.
Can anyone offer some direction?
Thanks!
-Glenn.
NewsArchive
11-27-2007, 03:04 AM
Perhaps an example would help.
MyDatabase123 is valid.
My-Database-123 is invalid.
My Database 123 is invalid.
MyDatabase_123 is invalid
How can I write a validation in setupbuilder to do this?
Glenn Paschal
NewsArchive
11-27-2007, 03:06 AM
Glenn,
> Perhaps an example would help.
>
> MyDatabase123 is valid.
> My-Database-123 is invalid.
> My Database 123 is invalid.
> MyDatabase_123 is invalid
>
> How can I write a validation in setupbuilder to do this?
Very easy to do - you have several options. For example, use "Handle String
Function (InStrI)" (see attached screenshot).
The demo will report that "My-Database-123" is invalid. Do the same
verification for "_", " " and you are done.
HTH,
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder 6.6
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
11-27-2007, 03:07 AM
I have to do that for every symbol? Was hoping I could validate on "what is
valid" rathern than "what is invalid"
Either way, this seems to be alot of code.
The only char's I want valid, are A-Z, a-z, 0-9.
Glenn Paschal
NewsArchive
11-27-2007, 03:07 AM
I think we already have such a function in the SetupBuilder runtime that
does something similar. I'll check if we can make it available in the
upcoming SetupBuilder 6.7.
Friedrich
NewsArchive
11-28-2007, 06:09 AM
Awsome.
Thanks!
-Glenn.
NewsArchive
11-30-2007, 10:49 AM
Glenn,
> Awsome.
>
"Contains Letters In" and "Contains Not Letters In" functions fixed and
improved now. The following in SetupBuilder 6.7 can do it (see attached
screenshot).
In this case char's valid, are A-Z, a-z, 0-9
Thanks,
Friedrich
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.