Page 1 of 1
Check password
Posted: Tue Dec 06, 2016 5:45 am
by René Houba
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?
Re: Check password
Posted: Tue Dec 06, 2016 9:59 am
by Stewart Marshall
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
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
Re: Check password
Posted: Tue Dec 06, 2016 10:03 am
by René Houba
Thanks Stewart, will test this tomorrow

Re: Check password
Posted: Tue Dec 06, 2016 7:21 pm
by René Houba
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?
Re: Check password
Posted: Tue Dec 06, 2016 7:39 pm
by dannyoorburg
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
Re: Check password
Posted: Tue Dec 06, 2016 7:59 pm
by René Houba
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!!