In a VL Web component a user can change the existing password of the current user.
I want to check that the password at least contains:
1. One lowercase character.
2. One uppercase character.
3. One special character.
4. One number.
Does anyone build something like this already?
Check password
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Check password
Hi Rene
This can be done in RDMLX, but it's far easier to use a regular expression. However, as these aren't available in RDMLX yet, I've attached an export of a widget that does the job.
This uses the following expression that I found somewhere on the internet
"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])"
RDMLX support for regular expressions is available in our development build. GA date is yet to be confirmed.
Simple webpage below showing its use
Regards
This can be done in RDMLX, but it's far easier to use a regular expression. However, as these aren't available in RDMLX yet, I've attached an export of a widget that does the job.
This uses the following expression that I found somewhere on the internet
"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])"
RDMLX support for regular expressions is available in our development build. GA date is yet to be confirmed.
Simple webpage below showing its use
Regards
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(488) Width(769)
Define_Com Class(#PRIM_LABL) Name(#Label) DisplayPosition(1) Ellipses(Word) Height(25) Left(392) Parent(#COM_OWNER) TabPosition(2) TabStop(False) Top(16) VerticalAlignment(Center) Width(120) ThemeDrawStyle('DarkTitle') Alignment(Center)
Define_Com Class(#PRIM_EDIT) Name(#Edit) DisplayPosition(2) Left(16) Parent(#COM_OWNER) ShowSelection(False) ShowSelectionHilight(False) TabPosition(1) Top(16) Width(369)
Define_Com Class(#Regex) Name(#RegularExpression)
Evtroutine Handling(#Edit.Changed)
If (#RegularExpression.isValidPassword( #Edit ))
#Label := "Valid"
Else
#Label := "Invalid"
Endif
Endroutine
End_Com
- Attachments
-
- Regex.zip
- (14.17 KiB) Downloaded 1277 times
-
René Houba
- Posts: 220
- Joined: Thu Nov 26, 2015 7:03 am
Re: Check password
Thanks Stewart, will test this tomorrow 
-
René Houba
- Posts: 220
- Joined: Thu Nov 26, 2015 7:03 am
Re: Check password
Hi Stewart,
Thanks for your example. I tested it and it works!!
The Widget you created is called Regex.
I now want to use your example, but I want to use the Widget name DIL_Check_Valid_Password.
So I copied the Implementation part into my Widget component and compiled the new Widget, but this does not seems to work. I see no methods created after the compile (see attachment).
What do I need to do for this?
Thanks for your example. I tested it and it works!!
The Widget you created is called Regex.
I now want to use your example, but I want to use the Widget name DIL_Check_Valid_Password.
So I copied the Implementation part into my Widget component and compiled the new Widget, but this does not seems to work. I see no methods created after the compile (see attachment).
What do I need to do for this?
- Attachments
-
- CheckValidPassword.jpg (241.33 KiB) Viewed 11142 times
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Check password
Hi Rene,
you'll need to manually add the Widget's public interface.
Alternatively you should probably have done a Copy from the right-click menu on Stewart's widget.
That would have copied interface + definition.
Danny
you'll need to manually add the Widget's public interface.
Alternatively you should probably have done a Copy from the right-click menu on Stewart's widget.
That would have copied interface + definition.
Danny
-
René Houba
- Posts: 220
- Joined: Thu Nov 26, 2015 7:03 am
Re: Check password
Hi Danny,
Thanks, that worked
.
I used right mouse to copy the Widget Component into a new one and with that I copied the Interface and its definition!!
Thanks, that worked
I used right mouse to copy the Widget Component into a new one and with that I copied the Interface and its definition!!