<?php
use Laminas\Validator\Explode;
use Laminas\Validator\Between;
$validator = new Explode();
$validator->setValidator(new Between([
'min' => 1,
'max' => 99,
]));
// true
dump($validator->isValid('2,79,5'));
dump($validator->getMessages());
// last element is empty string
dump($validator->isValid('2,6,55,'));
dump($validator->getMessages());
// 0 is less than min value
dump($validator->isValid('2,0,7'));
dump($validator->getMessages());
^ true
^ []
^ false
^ array:1 [ 0 => array:1 [ "valueNotNumeric" => "The min ('1') and max ('99') values are numeric, but the input is not" ] ]
^ false
^ array:1 [ 0 => array:1 [ "notBetween" => "The input is not between '1' and '99', inclusively" ] ]