Form::RANGE with callback
Notice: This thread is very old.
- martin.knor
- Member | 17
Is it possible to do something like this?
<?php
$delimiter1 = $range->addText('delimiter1');
$minValue = function() use ($delimiter1) {
return $delimiter1->getValue()+1;
};
$range->addText('delimiter2')
->addRule(Form::RANGE, 'Value must be %d or bigger!', array($minValue, null));
?>
- martin.knor
- Member | 17
Thanks, but this doesn't work with js validation. I must write own js validator.