- <?xml version="1.0" encoding="UTF-8"?>
- <ae:configurations
- xmlns="http://agavi.org/agavi/config/parts/validators/1.0"
- xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0"
- parent="%core.module_dir%/UserAuthentication/config/validators.xml"
- >
- <ae:configuration>
- <validators method="write">
- <validator class="string" required="true" name="firstname_valid">
- <argument>firstname</argument>
- <error>You did not enter a first name.</error>
- <ae:parameters>
- <ae:parameter name="min">1</ae:parameter>
- </ae:parameters>
- </validator>
- <validator class="string" required="true" name="lastname_valid">
- <argument>lastname</argument>
- <error>Your did not enter a last name.</error>
- <ae:parameters>
- <ae:parameter name="min">1</ae:parameter>
- </ae:parameters>
- </validator>
- <validator class="string" name="customer_specification" provides="customer_specification">
- <arguments>
- <argument>customer</argument>
- </arguments>
- <errors>
- <error>You did not enter a company.</error>
- </errors>
- <ae:parameters>
- <ae:parameter name="min">1</ae:parameter>
- </ae:parameters>
- </validator>
- <validator class="not" name="customer_usage" depends="customer_specification">
- <validator class="UserAuthenticationCustomerValidator">
- <arguments>
- <argument>customer</argument>
- </arguments>
- </validator>
- <errors>
- <error>That company is already registered, please contact your company administrator to add you.</error>
- </errors>
- </validator>
- <validator class="string" name="username_valid" depends="username_specification">
- <argument>username</argument>
- <error>You must provide a username of at least 6 charachters.</error>
- <ae:parameters>
- <ae:parameter name="min">6</ae:parameter>
- </ae:parameters>
- </validator>
- <validator class="string" name="password_specification" provides="password_specification">
- <arguments>
- <argument>password</argument>
- </arguments>
- <errors>
- <error for="required">You must provide a password.</error>
- </errors>
- <ae:parameters>
- <ae:parameter name="min">6</ae:parameter>
- </ae:parameters>
- </validator>
- <validator class="string" name="password_confirm_specification" provides="password_confirm_specification" depends="password_specification">
- <arguments>
- <argument>conpassword</argument>
- </arguments>
- <errors>
- <error for="required">You must confirm your password.</error>
- </errors>
- <ae:parameters>
- <ae:parameter name="min">6</ae:parameter>
- </ae:parameters>
- </validator>
- <validator class="equals" name="password_and_password_confirm_validation" depends="password_specification password_confirm_specification">
- <arguments>
- <argument>password</argument>
- <argument>conpassword</argument>
- </arguments>
- <errors>
- <error>The passwords must match.</error>
- </errors>
- </validator>
- <validator class="string" name="email_specification" provides="email_specification">
- <arguments>
- <argument>email</argument>
- </arguments>
- <errors>
- <error for="required">You must provide your e-mail address.</error>
- <error for="max">Your e-mail address may not exceed 255 characters in length.</error>
- </errors>
- <ae:parameters>
- <ae:parameter name="min">1</ae:parameter>
- <ae:parameter name="max">255</ae:parameter>
- <ae:parameter name="trim">true</ae:parameter>
- <ae:parameter name="export">email</ae:parameter>
- </ae:parameters>
- </validator>
- <validator class="email" name="email_validation" depends="email_specification" provides="email_valid">
- <arguments>
- <argument>email</argument>
- </arguments>
- <errors>
- <error>You must provide a valid e-mail address.</error>
- </errors>
- </validator>
- <validator class="not" name="email_usage" depends="email_valid">
- <validator class="UserAuthenticationEmailValidator">
- <arguments>
- <argument>email</argument>
- </arguments>
- </validator>
- <errors>
- <error>That e-mail address is already in use.</error>
- </errors>
- </validator>
- </validators>
- </ae:configuration>
- </ae:configurations>
- <?xml version="1.0" encoding="UTF-8"?>
- <ae:configurations xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0" xmlns="http://agavi.org/agavi/config/parts/filters/1.0">
- <!-- this section is only for web contexts -->
- <ae:configuration context="web">
- <filters>
- <filter name="FormPopulationFilter" class="AgaviFormPopulationFilter">
- <ae:parameter name="methods">
- <ae:parameter>write</ae:parameter>
- </ae:parameter>
- <ae:parameter name="output_types">
- <ae:parameter>html</ae:parameter>
- </ae:parameter>
- <ae:parameter name="field_error_messages">
- <ae:parameter name="parent::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' contacular-input-element ')]">
- <ae:parameter name="location">after</ae:parameter>
- <ae:parameter name="container"><![CDATA[${errorMessages}]]></ae:parameter>
- <ae:parameter name="markup"><![CDATA[<div class="contacular-error">${errorMessage}</div>]]></ae:parameter>
- </ae:parameter>
- </ae:parameter>
- <ae:parameter name="error_messages">
- <ae:parameter name="self::*">
- <ae:parameter name="location">before</ae:parameter>
- <ae:parameter name="container"><![CDATA[<div class="contacular-display-error"><strong>The following errors occurred while processing your request:</strong><ul>${errorMessages}</ul></div>]]></ae:parameter>
- <ae:parameter name="markup"><![CDATA[<li>${errorMessage}</li>]]></ae:parameter>
- </ae:parameter>
- </ae:parameter>
- <ae:parameter name="error_class">contacular-input-error</ae:parameter>
- </filter>
- <!-- <filter name="TidyFilter" class="AgaviTidyFilter">
- <ae:parameter name="tidy_options">
- <ae:parameter name="output-xhtml">true</ae:parameter>
- <ae:parameter name="numeric-entities">true</ae:parameter>
- </ae:parameter>
- <ae:parameter name="tidy_encoding">utf8</ae:parameter>
- </filter> -->
- </filters>
- </ae:configuration>
- </ae:configurations>