Details
-
Bug
-
Resolution: Fixed
-
Minor
-
COmanage Registry 4.4.0 (Sparkling Summit)
Description
The beforeValidate() method for the CoPersonRole model is currently
public function beforeValidate($options = array()) { if(!empty($_REQUEST['data'][$this->alias])) {
|
foreach ($_REQUEST['data'][$this->alias] as $field => $value) {
|
if(strpos($field, '-required') !== false) {
|
// Just found a required field. We will update the rule accordingly
|
// required means that the field should be non-empty and present
|
// $ea['required'] = !($ea['allow_empty'] && $vv_allow_empty_cou);
|
$field = explode('-', $field)[0];
|
$this->validate[$field]['content']['required'] = true;
|
$this->validate[$field]['content']['allowEmpty'] = false;
|
$this->validate[$field]['content']['message'] = "COU is required";
|
}
|
}
|
} return parent::beforeValidate($options);
|
}
|
Note that the message key is set to "COU is required" for all fields and not just the COU field.
Attachments
Issue Links
- is related to
-
CO-2839 Extended Type affiliation fails validation during enrollment
-
- Resolved
-