FormatMessage

Allows formatting a message sent by the validation of a field, using the Message template configured for this field.

Arguments

Argument Description
* message Instance of the validation message. It should be an instance returned by the Fluid ViewHelper: f:form.validationResults.
field

If for any reason you are using this ViewHelper inside the ViewHelper Field, you can fill the argument field with the name of the field which will be bound to this class.

It must be a valid field name for the current form.

Example

1
2
3
4
5
6
7
    {namespace fz=Romm\Formz\ViewHelpers}

    <f:form.validationResults for="{formName}.{fieldName}">
        <f:for each="{validationResults.errors}" iteration="iteration" as="error">
            <fz:formatMessage message="{error}" />
        </f:for>
    </f:form.validationResults>