CCK fields with "unlimited" values can bypass validation
GuyPaddock - May 4, 2009 - 01:04
| Project: | Validation API |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
If a node has a CCK field that accepts "unlimited" values, and the user clicks the "Add another item" on the submission form, validation is entirely bypassed for that field.
Steps to reproduce:
- Create a new type of content (for the purposes of these steps, assume the name of the content type is "test").
- Create a CCK text field and set the "number of values" to "unlimited" (for the purposes of these steps, assume the name of the field is "test_field").
- Set-up a validation for the field (for the purposes of these steps, the "Form ID" would be "test_node_form" and the "form field" value of the validation would be "field_test_field[%]").
- Go to the node add add form (node/add/test).
- Fill-in the standard required node information (title, body, etc.)
- For the CCK text field with the validation, click "Add another item", and then enter values that would not pass validation for all of the items of the field.
- Submit the form.
Expected Results
The form fails validation regardless of how many items are provided for the form field.
Actual Results
Validation is skipped when the form is initially submitted. However, going back and editing the form and then attempting to submit the node edit form fails validation.
