Forms Configure

We'll create a forms configuration file for our outside module. The file will contain a form definition for our login form. Save the following to /WEB-INF/calyxo-forms-config-outside.xml:

<calyxo-forms-config version="0.9"
  xmlns="http://calyxo.odysseus.de/xml/ns/forms">

  <forms>

    <form name="login">
      <field property="user">
        <match name="regexp">
          <property name="pattern" value="^[a-z][a-zA-Z0-9]{2,7}$"/>
          <message bundle="messages" key="login.user.invalid"/>
        </match>
      </field>
      <field property="password">
        <match name="notEmpty">
          <message>
            <arg name="field" value="password"/>
          </message>
        </match>
      </field>
      <assert test="input.user != input.password">
        <message bundle="messages" key="login.userAndPasswordEqual"/>
      </assert>
    </form>

  </forms>

</calyxo-forms-config>

The configuration defines a form named login with two input fields: