Form::RANGE with callback

Notice: This thread is very old.
martin.knor
Member | 17
+
0
-

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));
?>
Casper
Member | 253
+
0
-

Try callback rule (Czech only)

martin.knor
Member | 17
+
0
-

Thanks, but this doesn't work with js validation. I must write own js validator.