We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix package for validators

...

Code Block
titleUsage example
languagehtml/xml
<field type="rule" variable="test.notempty">
  <description align="left" txt="A description for a rule input field." id="description.rule.1"/>
  <spec txt="Please enter your phone number:" layout="( N:3:3 ) N:3:3 - N:4:4 x N:5:5" resultFormat="specialSeparator" separator="."/>
  <validator class="com.izforge.izpack.utilpanels.userinput.validator.NotEmptyValidator" txt="The phone number is mandatory!" />
</field>

...

<field type="password" align="left" variable="the.password">
  <spec>
    <pwd txt="The Password:" size="25" set=""/>
    <pwd txt="Retype Password:" size="25" set=""/>
  </spec>
  <validator class="com.izforge.izpack.utilpanels.userinput.validator.PasswordEqualityValidator"
        txt="Both passwords must match." id="lang pack key for the error text"/>
</field>

...

<field type="password" align="left" variable="keystore.password">
  <spec>
    <pwd txt="Keystore Password:" size="25" set=""/>
    <pwd txt="Retype Password:" size="25" set=""/>
  </spec>
  <validator class="com.izforge.izpack.utilpanels.userinput.validator.PasswordEqualityValidator"
                txt="Both keystore passwords must match." id="key for the error text"/>
  <validator class="com.izforge.izpack.utilpanels.userinput.validator.PasswordKeystoreValidator"
                txt="Could not validate keystore with password and alias provided." id="key for the error text">
    <param name="keystoreFile" value="${ssl.keystore}"/>
    <param name="keystoreType" value="${ssl.keystore.type}"/>
    <param name="keystoreAlias" value="${keystore.key.alias}"/>
    <param name="skipValidation" value="${skip.keystore.validation}"/>
  </validator>
</field>

...

<field type="text" variable="EMAILaddress">
  <spec
      txt="Your Email address:" set="you@domain.com" size="20" id=""
  />
  <validator
  class="com.izforge.izpack.utilpanels.userinput.validator.RegularExpressionValidator"
      txt="Invalid email address!">
    <param
        name="pattern"
        value="[a-zA-Z0-9._-]{3,}@[a-zA-Z0-9._-]+([.][a-zA-Z0
        -9_-]+)*[.][a-zA-Z0-9._-]{2,4}"
    />
  </validator>
</field>

...

<field type="password" align="left" variable="db.password">
  <spec>
    <pwd txt="DB Password:" size="25" set=""/>
    <pwd txt="Retype Password:" size="25" set=""/>
  </spec>
  <validator class="com.izforge.izpack.utilpanels.userinput.validator.PasswordEqualityValidator"
                txt="Both DB passwords must match." id="key for the error text"/>
  <validator class="com.izforge.izpack.utilpanels.userinput.validator.RegularExpressionValidator"
                txt="Service password must begin with a character and be 8-20
                                 mixed-case characters, numbers, and special characters [#@!$_]."
                                 id="key for the error text">
    <param name="pattern" value="^(?=[a-zA-Z])(?=.*[0-9])(?=.*[#@!$_])
                (?=.*[A-Z])(?=.*[a-z])(?!.*[^a-zA-Z0-9#@!$_])(?!.*\s).{8,20}$"/>
  </validator>
</field>

...