Hi guys, I was wondering how can I validate a field list, I saw many examples but using form, and I need to validate this field and use it inside a GriedField:
$fields = FieldList::create(
$categories=DropdownField::create('ParentCat','Categoria',array(""=>"Seleccionar",1=>"Para Comprar",2=>"Para Disfrutar")),
$subcat=TextField::create('Title','Subcategoria'),
$icon=TextField::create('Icon','Icono'),
TextField::create('BackgroundColor','Fondo categoria')
);
//I have tried this, but how to trigger it?
$validator=new RequiredFields('ParentCat');
return $fields
Thanks in advanced.