N°6414 Disable Field validation for untouched attcodes

This commit is contained in:
Pierre Goiffon
2023-06-27 17:08:15 +02:00
parent f40674ec85
commit 52049b7837
5 changed files with 136 additions and 26 deletions

View File

@@ -1152,6 +1152,13 @@ abstract class AttributeDefinition
$oFormField->AddMetadata('value-raw', (string)$oObject->Get($this->GetCode()));
}
// We don't want to invalidate field because of old untouched values that are no longer valid
$aModifiedAttCodes = $oObject->ListChanges();
$bAttributeHasBeenModified = array_key_exists($this->GetCode(), $aModifiedAttCodes);
if (false === $bAttributeHasBeenModified) {
$oFormField->SetValidationDisabled(true);
}
return $oFormField;
}