In previous days I asked this question Validation" greater than "or" less than "in the request of laravel to obtain a customized validation in laravel that worked correctly validating two fields, but I would like to know if it is possible to perform this same validation in a multiregistro
I am validating that for each record, the field value paid is not greater than the field value invoice and I am doing it this way:
public function rules()
{
$valor = count($this->get('valorFacturaPagoForwardDetalle'));
for($i = 0; $i < $valor; $i++)
{
$validacion['valorPagadoPagoForwardDetalle'.$i] = 'required_with:valorFacturaPagoForwardDetalle'.$i.'|numeric|min:1';
$validacion['valorFacturaPagoForwardDetalle'.$i] = 'required_with:valorPagadoPagoForwardDetalle'.$i.'|numeric|greater_than_field:valorPagadoPagoForwardDetalle'.$i;
}
return $validacion;
}
I do not know what error I may have but the code but this validation is not working.