I have a Register setup with the following code:
[[!Register?
&submitVar=`registerbtn`
&usernameField=`email`
&validate=`
nospam:blank,
email:required:email,
password:required:minLength=^6^,
password_confirm:password_confirm=^password^,
fullname:required`
&placeholderPrefix=`reg.`
&persistParams=`1`
&activationEmailSubject=`Activate your Registration`
&usergroups=`4`
successMsg=`Your information was successfully submitted. Please check your email to validate.`
&activationResourceId=`201`
]]
<div class="register">
<div class="registerMessage">[[!+reg.error.message]]</div>
<form action="[[~[[*id]]]]" method="post">
<input type="hidden" name="nospam" value="[[!+reg.nospam]]" />
<label for="name"><span>Name</span>
<span class="error">[[!+reg.error.name]]</span>
<input type="text" name="fullname" id="name" value="[[!+reg.fullname]]" />
</label>
<label for="email"><span>Email</span>
<span class="error">[[!+reg.error.email]]</span>
<input type="text" name="email" id="email" value="[[!+reg.email]]" />
</label>
<label for="password">Password:
<span class="error">[[!+reg.error.password]]</span>
<input type="password" name="password" id="password" value="[[!+reg.password]]" />
</label>
<label for="password_confirm">Confirm password:
<span class="error">[[!+reg.error.password_confirm]]</span>
<input type="password" name="password_confirm" id="password_confirm" value="[[!+reg.password_confirm]]" />
</label>
<div class="form-buttons">
<input type="submit" name="registerbtn" value="Continue" />
</div>
</form>
</div>
This works fine to register users, but there’s a strange problem with validation: If you leave all the fields blank, errors come up... but they’re repeated more than once! Here’s a screenshot of the output:
Anybody care to take a guess as to why this is happening