Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.6

Request #5965 Turn off automatic setting of qf_rules
Submitted: 2005-11-15 10:30 UTC
From: arne dot bippes at brandao dot de Assigned: wiesemann
Status: Closed Package: DB_Table
PHP Version: Irrelevant OS: irrelevant
Roadmaps: (Not assigned)    

 [2005-11-15 10:30 UTC] arne dot bippes at brandao dot de
Description: ------------ QuickForm.php sets certain rules depending on some column-settings (size,type,required) This is quite comfortable but not always wanted. Please provide a flag (which is turned on by default) to turn off this behaviour. e.g. qf_rules_auto or qf_set_rules or qf_no_rules or whatever. Just for your understanding: i need this behaviour because i have a table with a foreign id pointing to a table containing file-meta-information. The quickform-typ is file (which will be saved in the foreign table). Therefore i want to upload a file but db_table checks against 'numeric'-Rule ... Test script: --------------- in Quickform.php this would just be enough: if ( ! isset($col['qf_set_rules']) || $col['qf_set_rules'] === true) { ... set the rules ... } Expected result: ---------------- $col['qf_rules']['numeric'] = null; $col['qf_rules']['maxlength'] = null; $col['qf_rules']['required'] = null;


 [2005-11-15 11:39 UTC] wiesemann
Hi Arne, I understand your request. There may be other situations where the QF rules interfere with the user's implementations. I will think about a good name for the array key and implement this feature in the next few days. Mark
 [2005-11-15 21:07 UTC] wiesemann
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. ----------- You can now use this in the column array: 'qf_set_default_rules' => false Rules defined via the 'qf_rules' key will still be added to the form.
 [2006-11-03 22:39 UTC] wiesemann (Mark Wiesemann)
Optimized code for handling of file elements is now available in CVS: - instead of the 'required' rule, the 'uploadedfile' rule is now set - the 'numeric' and 'maxlength' rules are not set anymore