Deprecation: #106527 - markFieldAsChanged() moved to FormEngine main module
See forge#106527
Description
The static method
mark in the module
@typo3/ is used to modify the markup in the
DOM to mark a field as changed. Technically, this is unrelated to validation
itself, therefore the method has been moved to
@typo3/.
Impact
Calling
mark from
@typo3/ will trigger a deprecation notice
in the browser console.
Affected installations
All extensions using the deprecated code are affected.
Migration
If not already done, import the main FormEngine module and call
mark from there.
Example:
- import FormEngineValidation from '@typo3/backend/form-engine-validation.js';
+ import FormEngine from '@typo3/backend/form-engine.js';
- FormEngineValidation.markFieldAsChanged(fieldReference);
+ FormEngine.markFieldAsChanged(fieldReference);
Copied!
Example compatibility layer:
import FormEngine from '@typo3/backend/form-engine.js';
import FormEngineValidation from '@typo3/backend/form-engine-validation.js';
if (typeof FormEngine.markFieldAsChanged === 'function') {
FormEngine.markFieldAsChanged(fieldReference);
} else {
FormEngineValidation.markFieldAsChanged(fieldReference);
}
Copied!