PluginProbe
Packeta / 2.1
Packeta v2.1
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
← All changes | deps/nette/forms/src/Forms/Controls/BaseControl.php +9 -2 1.6.12.1 View file →
@@ -335,9 +335,8 @@
335 335 return $this;
336 336 }
337 337 /**
338 338 * Adds a validation condition a returns new branch.
339 - * @return Rules new branch
340 339 */
341 340 public function addCondition($validator, $value = null) : Rules
342 341 {
343 342 return $this->rules->addCondition($validator, $value);
@@ -343,13 +342,21 @@
343 342 return $this->rules->addCondition($validator, $value);
344 343 }
345 344 /**
346 345 * Adds a validation condition based on another control a returns new branch.
347 - * @return Rules new branch
348 346 */
349 347 public function addConditionOn(Control $control, $validator, $value = null) : Rules
350 348 {
351 349 return $this->rules->addConditionOn($control, $validator, $value);
350 + }
351 + /**
352 + * Adds a input filter callback.
353 + * @return static
354 + */
355 + public function addFilter(callable $filter)
356 + {
357 + $this->getRules()->addFilter($filter);
358 + return $this;
352 359 }
353 360 public function getRules() : Rules
354 361 {
355 362 return $this->rules;