Details
-
Task
-
Resolution: Unresolved
-
Major
-
COmanage Registry 0.4 (Reshaped Cake)
-
None
Description
It's not clear the Registry consistently follows Cake's definition of required vs allowEmpty. Consider data being submitted as
$data['Model']['field'] = "value";
In Cake, "required => true" means 'field' must be present in $data['Model']. "allowEmpty => false" means "value" must be provided.
In Registry, "required" means "SQL NOT NULL".
Review $validates in each model to ensure the correct usage is intended. ie: If a field is NOT NULL in the schema, then allowEmpty should be set to false. There are few, if any, use cases for required to be set.
When cleaning this up, see if any COmanage code is directly inspecting $validates.