[TYPO3-english] Extbase better validation messages

Jan Bednarik info at bednarik.org
Mon Dec 8 21:19:43 CET 2014


Hi Jigal,

it didn't work. I'm using "rewrittenPropertyMapper" (as Extension 
builder sets it by default and I have no idea what it is :) ) and in 
that case the "errors" are not set and moreover, this is marked as 
deprecated.

Anyway, this gave me an idea and I've managed to resolve it. It just 
needs VHS extension installed:

{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<f:form.validationResults for="{formName}" >
     <f:if condition="{validationResults}">
         <v:variable.set 
name="results">{validationResults->v:call(method:'forProperty',arguments:{0:'{fieldName}'})}</v:variable.set>
         <f:for each="{results.errors}" as="error">
             <strong class="error">{error.message}</strong>
         </f:for>
     </f:if>
</f:form.validationResults>

Regards

Jan



Dne 6. 12. 2014 22:38, Jigal van Hemert napsal(a):
> Hi,
>
> On 05/12/2014 22:09, Jan Bednarik wrote:
>> is it possible to show validation message near each field rather than
>> all of them above the form?
>
> Maybe this (German) article has some examples?
> http://www.npostnik.de/typo3/fehlermeldung-mit-fluid-direkt-neben-dem-feld-ausgeben/
>
>



More information about the TYPO3-english mailing list