Story #8050
allow object properties to be optional
| Status: | Accepted | Start date: | 2010-06-03 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Extbase: Validation | |||
| Target version: | Extbase 6.2 | |||
| Has patch: | No | Tags: | ||
| Votes: | 3 (View) |
Description
When a model has validators the value may not be empty. To overcome this issue honour the @optional annotation for a property.
Note: instead of @optional the annotation could also be named @allowEmpty or @nullable.
Issues: The patch uses empty(), but this yields TRUE for "0" strings and 0 integers, which may or may not be expected. IMHO "0" is a problem, but 0 zero not in all cases (as TYPO3 doesn't allow NULL for integer columns anyway).
Related issues
| related to Extbase MVC Framework - Feature #5973: EmailAddressValidator allow empty|valid email address | Closed | 2010-01-12 | ||
| related to Extbase MVC Framework - Bug #26617: DateTime validator should accept NULL dates | Closed | 2011-05-04 | ||
| duplicated by Extbase MVC Framework - Bug #9556: Validator: EmailAddress, Float, DateTime, ... not accept ... | Closed | 2010-09-01 |
History
Updated by Martin Kutschker almost 3 years ago
Just to clarify the case. This issue is not about optional controller arguments but about object properties that may be empty (or NULL).
Updated by Sebastian Kurfuerst over 2 years ago
- Tracker changed from Feature to Story
- Priority changed from Should have to Could have
This feature needs to be in sync with FLOW3.
Updated by Sebastian Kurfuerst over 2 years ago
- Category set to Extbase: Validation
Updated by Ingo Pfennigstorf 8 months ago
- Status changed from New to Accepted
- Priority changed from Could have to Should have
- Target version set to 6.1.0
- Has patch set to No
Good one, stumbled over this a few times in the past
Updated by Ingo Pfennigstorf 8 months ago
- Target version changed from 6.1.0 to Extbase 6.1
Updated by Alexander Schnitzler 25 days ago
- Target version changed from Extbase 6.1 to Extbase 6.2