Bug #36660
TCA type-field and required fields bypass
| Status: | New | Start date: | 2012-04-27 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| TYPO3 Version: | 4.7 | Complexity: | ||
| PHP Version: | 5.3 | |||
| Votes: | 0 |
Description
I'm using a TCA type-feature, when some table contains so called "type-field",
which defines different views of same record at BE.
Let's see following cases of type-switching:
1. Record is already existing, field is required and it's content was changed
- switching type saves the field and reloads the form;
2. Record is already existing, field is required and it's content was set to empty
- switching type doesn't save the field, reloads the form and restores previous field's value;
3. Record is new, field is required, and it's content is set to something
- switching type saves the record with field's value and reloads the form;
4. Record is new, field is required, but not filled with anything
- switching type saves the record with empty required field.
As you see, we have a problem in item 4, since user can bypass a required field validation, and it may break a logic of application, which requires some fields to be filled with something.
History
Updated by Björn Pedersen about 1 year ago
Yes, the saving during switching is sometimes a problem. One idea would be to create a temporary versioned record and automatically switch that record oce a real save is done.