PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_Table » Bug #5965

Turn off automatic setting of qf_rules

Details

Request #5965Turn off automatic setting of qf_rules
Submitted2005-11-15 10:30 UTC
Fromarne dot bippes at brandao dot de
Assignedwiesemann
StatusClosed
PackageDB_Table
PHP VersionIrrelevant
OSirrelevant
Roadmaps(Not assigned)

Comments

[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;