Hi. I need to have custom validation messages in a field that is in a repeater in a tailor Blueprint. According to the documentation I can use the “validation” property to set rules, attributes names and custom messages. The issue is that I can’t figure out how to make that work with the fields inside a repeater. I have naturally tried dot notation (repeatername.fieldname) with no luck.
Hey @federico.schafer !
Can you share a simple example of what you want to achieve as blueprint definitions?
Hi @daft , yes of course. The blueprint would be like this (but the validation doesn’t work though):
handle: Secciones
type: global
name: Banner Inicio
primaryNavigation:
label: Banner Inicio
icon: icon-magic
order: 130
navigation:
label: Banner Inicio
icon: icon-clone
order: 1
validation:
rules:
slider.banner_image: required|between:3,3
attributeNames:
slider.banner_image: Imagenes del banner
customMessages:
slider.banner_image.required: "Debe cargar 3 imágenes"
fields:
slider:
label: 'Banner Promociones'
type: repeater
tab: General
displayMode: builder
prompt: 'Agregar banner'
form:
fields:
banner_image:
label: Imagen Banner
type: fileupload
mode: image
maxFiles: 3
titulo:
label: Título
type: text
frase:
label: Descripción
type: textarea
size: small
@daft the part that resembles what I was trying to achieve is that where the “validation” parameter is. I tried to access the repeater fields with dot notation to be validated, but with no success. No errors but no validation. Hope this further explanation makes more sense