validate user input - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

tony_strong
Posts: 2
Joined: Mon Mar 11, 2013 6:13 pm

validate user input

Hi
I am evaluating Advanced Installer 9.9 in Enterprise mode, and have most things working EXCEPT:

I have created a simple dialog to let the user enter their "software code" (this is unique to each installation)

I wish to check this "code" before writing it to a file on their disk
1. Length of code should be 15 characters
2. characters 4&5 should be "UK"
3. characters 6&7 should be "AC" OR "BC"
4. characters 12 - 15 should be digits

Is there a simple way of doing this? or can i only just check for non-null string?

thanks in anticipation...

Tony
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: validate user input

Hi Tony and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

There are some points you can achieve in Advanced Installer, but for the rest you can create your own custom action.
1. Length of code should be 15 characters
Create a "Masked Edit" control and in the "Text" text field from the "Properties" pane use the template you want (i.e. <???????????????> for 15 characters).
2. characters 4&5 should be "UK"
3. characters 6&7 should be "AC" OR "BC"
Unfortunately, we don't have predefined support for these points.
4. characters 12 - 15 should be digits
You can use the following template: <???????????####>
or can i only just check for non-null string?
You can verify if the property related to your "Masked Edit" control is empty (i.e NOT MASKEDEDIT_1_PROP). A similar problem is discussed in the How to enable/disable NEXT button on textbox keypress event? thread.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”