Date: | 2011-05-29 19:49:30 (13 years 6 months ago) |
---|---|
Author: | Thomas Keller |
Branch: | master |
Commit: | 324ae60b390d91e85b0123b34da7253a18119b6a |
Parents: |
3f985c690c87a9629940e7419f15491ae3a35f55 |
Message: | Add support for closures / lambdas as per-field validation methods The syntax for closures is $this->clean_foo = function($form) { // process $form->cleaned_data['foo'] } This eases the handling of dynamic form fields somewhat that all share some basic validation code, but can occur multiple times. |
Changes: |
|
File differences
src/Pluf/Form.php | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|