RiteshKumar
Posts: 4
Joined: Tue Dec 10, 2013 11:31 am

Email ID validation

Hi everyone,
I need to create an email id validation in my package installation.I have completed most of the part by running an inline script code which accepts email id and checks if it is valid.But I have to create the error message box through the installer`s custom actions rather than through the script code message box.How shall I link the custom action with the script.I will attach my aip if needed.


Thanks & Regards,
Ritesh kumar.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Email ID validation

Hello Ritesh,

In order to achieve that you can set a property within your script and use its value as a condition for the Display message box predefined custom action.

So, you can add the predefined custom action without sequence from the Custom Action page. Then, on the [ Next >> ] button from the same dialog where the user needs to enter his email address you can add the custom action as a published event and condition its execution upon your property value(e.g. Email_Validation=”fail”). As it can be seen, this custom action will be executed only if the entered email address is not a valid one.

Also, you should condition the execution of the Display a specific dialog published event, so it can go further with the installation only if the entered email address is correct. (e.g. Email_Address=”ok”). You can take a look on the How do I make sure an edit box is not empty article which may be useful to you.

Please let us know if you need any help.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Meena
Posts: 36
Joined: Thu Dec 12, 2013 9:07 am

Re: Email ID validation

hi Dan,
I had also same problem with that Email ID validation.Can you,Please explain about this in detail.A small example would be very helpful.


Regards,
Meena
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Email ID validation

Hi Meena and welcome to Advanced Installer forums

I've attached a .zip archive that contains a sample which implements this scenario.
Basically, I have an edit box where the user needs to enter a valid email address in order to proceed further with the installation.

On the same dialog I have tho custom actions which are executed as published event on the [ Next >> ] button:
This custom actions I've added in the Custom Actions page without sequence.

In the Execute inline script predefined custom action I've made a dummy validation email address. I make sure the length of the entered email address is more than 5, before the @ character I have at least 2 character, etc. If the entered email address is valid then I set a property VALID_EMAIL_ADDRESS with the valid string.
If the entered email address doesn't fulfill my minimum requirements then I set this property with the invalid string.

When the user hit the [ Next >> ] button, I display a message box if the entered email address is not valid and also I prevent the user to proceed further with the installation until he enter a valid email address.

Please let me know if there is anything I can help with.

Best regards,
Dan
Attachments
SampleEmailValidation.zip
(3.03 KiB) Downloaded 474 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”