Bug #4667
Error class magic only works for object properties....
Status: | Resolved | Start date: | 2009-09-17 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | ViewHelpers | |||
Target version: | - | |||
Has patch: | Affected Flow version: |
Description
Like:
<f:form.textbox property="whatever" errorClass="iFail" />
Should work for:
<f:form.textbox name="whatever" errorClass="iFail" />
as well.
History
#1 Updated by Bastian Waidelich almost 6 years ago
- Project changed from Extbase MVC Framework to TYPO3.Fluid
- Category deleted (
432)
#2 Updated by Bastian Waidelich almost 6 years ago
- Category set to ViewHelpers
- Status changed from New to Needs Feedback
- Branch set to v4 + v5
But how should the error handling work, if the textbox was not bound to a property?
#3 Updated by Nikolas Hagelstein over 5 years ago
Bastian Waidelich wrote:
But how should the error handling work, if the textbox was not bound to a property?
yes but it has a name and it's bound to the namespaced form so it could be assigned to
appropriate property within the error object.
#4 Updated by Bastian Waidelich over 5 years ago
Nikolas Hagelstein (pulponair) wrote:
yes but it has a name and it's bound to the namespaced form so it could be assigned to
appropriate property within the error object.
Ok, but why wouldn't you just bind it to the property in that case?
#5 Updated by Nikolas Hagelstein over 5 years ago
Bastian Waidelich wrote:
Nikolas Hagelstein (pulponair) wrote:
yes but it has a name and it's bound to the namespaced form so it could be assigned to
appropriate property within the error object.Ok, but why wouldn't you just bind it to the property in that case?
A property would presume an object. Many real world forms do not reference to an object or they consist of a mixture of object fields and addtional fields.
Sample:
<f:form controller="AnyController" action="index" object="{user}" name="user" id="userForm"> <f:form.textbox property="username" /> <f:form.textbox property="password" /> <f:form.textbox name="passwordConfirmation" /> </form>
In this case username and password refere to an object (domain model user).
But passwordConfirmation das not belong to this object at all but needs to be validated as well.
Imagine forms that do not to refere to an object at all. E.g. if the form data contains various Information and real objects are created from this information after the form has been submited succesfully.
#6 Updated by Bastian Waidelich over 5 years ago
- Assigned To set to Sebastian Kurfuerst
Nikolas Hagelstein (pulponair) wrote:
A property would presume an object.
Ok, I see. But AFAIK the property validation only works for bound objects yet. I'm assigning this to Sebastian for now.
Thanks for your feedback!
Bastian
#7 Updated by Nikolas Hagelstein over 5 years ago
Bastian Waidelich wrote:
Ok, I see. But AFAIK the property validation only works for bound objects yet. I'm assigning this to Sebastian for now.
Nope works for controller arguments as well:
@validate $forename notEmpty public function indexAction($forename.....
#8 Updated by Sebastian Kurfuerst about 5 years ago
- Assigned To deleted (
Sebastian Kurfuerst)
#9 Updated by Sebastian Kurfuerst about 4 years ago
- Status changed from Needs Feedback to Resolved
works now with the new Validation.