[Ref][Import] Start adding testing to validation, simplify #23415
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
[Ref][Import] Start adding testing to validation, simplify
This PR should result in the Preview process continuing to identify if name fields are missing with no change in behaviour
Before
$values
array - which represents a row in the csvdeprecated
function - which originated from shared codeAfter
$params
once the$values
row has been mapped to a$params
- this means it can just check the params keysTechnical Details
This will be simplified once other open PRs -
#23401#23408 are mergedThe second round of validation would have been required in the past for the related contacts (not currently checked in the first round) because it used to then call the
Contact:create
BAO directly - which didn't do validation. However, it now calls the v3 api - so the same exception would be thrown from the api as would be thrown from the second-round-validationComments
Anything else you would like the reviewer to note