Skip to content

Commit

Permalink
document LinkedIdOptions interface for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
LocalNewsTV committed Nov 28, 2024
1 parent dc1010e commit 256c375
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/src/utils/batch/validation/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,19 @@ const validateShortID = (shortId: string, activityLetter: string) => {
return shortIdPattern.test(shortId);
};

/**
* @desc Customization for Linked ID Validation
* @property {string[]} expectedRecordTypes Recordtypes that must match to be properly linked
* @property {string[]} shortIdActivityLetters unique three letter code in Activity Short ID identifying it as a record type. e.g. 'PAC', 'PTM', etc
*/
interface LinkedIdOptions {
expectedRecordTypes: string[];
shortIdActivityLetters: string[];
}
/**
* @desc Validation Handler for matching Records with linked_id
* Validates fields in form to ensure data properly links with an existing record.
* @param data
* @param result
*/

const _handleGetLinkedId = async (
shortId: string,
result: CellValidationResult,
Expand Down

0 comments on commit 256c375

Please sign in to comment.