[izpack-users] Regex checking and staring passwords on userInputSpec.xml
Matt_nz
matthewd at datacom.co.nz
Fri Aug 17 01:29:11 CEST 2007
First I would like to say thanks for all the hardwork that has gone into
Izpack.
I have got the installer all working to my liking, and now I am going back
and fixing a few issues that have arisen.
I'm using Izpack ver 3.10.2.
The following code works fine and does the regex checking I require.
<userInput>
<panel order="0">
<field type="title" txt="Administrator credentials" align="left"/>
<field type="staticText" align="center" txt="Please Enter a username.
Username must be between 5-15 alpha numeric characters and can include - and
_" />
<field type="rule" variable="USERNAME">
<spec txt="Username:" layout="AN:15:15" resultFormat="displayFormat" />
<validator
class="com.izforge.izpack.util.RegularExpressionValidator"
txt="Invalid username entered, username must be between 5-15 alpha
numeric characters">
</validator>
</field>
<field type="space" align="center"/>
<field type="staticText" align="left" txt="Please Enter a password.
Password must be between 8-15 characters" />
<field type="rule" variable="PASSWORD">
<spec txt="Password:" layout="O:15:15"
resultFormat="displayFormat" />
<validator
class="com.izforge.izpack.util.RegularExpressionValidator"
txt="Invalid password entered, Password must be between 8-15
characters.">
</validator>
</field>
</panel>
</userInput>
Now the problem is trying to star the Password input field I've tried
combinations of:
<field type="password" variable="PASSWORD">
<spec>
<pwd txt="Password:" size="15" id="pwd.label"/>
</spec>
<...validator...>
</field>
And then attaching my validator where indicated, this doesn't work. I've
also tried having the <pwd txt input above the rule input and passing the
value of $PASSWORD to the rule as a hidden input.
Is what I'm trying to do possible with userinputSpec in its current form?
It appears to be the case that field type="password" cannot use the
RegualrExpressionValidator, if so any other ways to do this? I want to star
a password and restrict its length to 8-15 characters (I can be more
leanient on valid characters if necessary).
Thanks for your help.
Matt
--
View this message in context: http://www.nabble.com/Regex-checking-and-staring-passwords-on-userInputSpec.xml-tf4270007.html#a12153194
Sent from the izpack users mailing list archive at Nabble.com.
More information about the izpack-users
mailing list