There is a bug in the module if any text field contains the html input array format then client-side validation work but after submit, the field still shows the un-match error message. E.g we have two fields like password and confirm password and their html attributes are like
<input type="password" id="edit-fields-register-new-pass" name="fields[register_new_pass]" size="auto" maxlength="128" class="form-text required error">
<input type="password" id="edit-fields-register-new-pass-confirm" name="fields[register_new_pass_confirm]" size="auto" maxlength="128" class="form-text required">
and we have implemented the following rule in the form alter
$form['fields']['register_new_pass_confirm']['#rules'][] =
array(
'rule' => 'match_field[fields[register_new_pass]]',
'error' => 'The passwords don’t match.'
);
It works fine as js part(client-side) validation but after form submits we see *The passwords don’t match* error message. If anybody faces the same type problem, attach patch fixes the issue. Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | fapi_validation-Match-Field-htlm-name-array-bug-2937586-D7.patch | 660 bytes | asghar |
Comments
Comment #2
asghar commentedComment #3
asghar commentedComment #4
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.