outlet.validate
ViewHelper to validate Outlet arguments
Use <flux:
inside the <flux.
viewHelper.
You can add any number of validations to the arguments. After submission
validation errors will be available inside the validationResults variable.
Example
- <f:section name="Configuration">
- <flux:outlet>
- <flux:outlet.argument name="name">
- <flux:outlet.validate type="NotEmpty" />
</flux:outlet.argument>
</flux:outlet>
</f:section>
- <f:section name="Main">
- <f:form noCache="1">
- <f:form.textfield name="name" value="{name}" /> <f:if condition="{validationResults.name}"> <f:for each="{validationResults.name}" as="error"> <span class="error">{error.code}: {error.message}</span> </f:for> </f:if>
</f:form>
</f:section>
Arguments
type
- DataType
- string
- Required
- false
- Description
- Validator to apply
options
- DataType
- mixed
- Required
- false
- Description
- Additional validator arguments