in src/services/form-validation/FormValidationService.ts [220:238]
public validateFileMeta(
formSchemaInput: Readonly<FormSchema>,
documentKey: string,
fileMeta: FormFieldValidationInput,
): boolean {
// Copying values in order to avoid external data mutations
const formSchema = _.cloneDeep<FormSchema>(formSchemaInput); // TODO: clone later
const fileComponent = this._findComponentInComponents(formSchema.components, documentKey);
if (!fileComponent) {
throw new MissingFormComponentError(documentKey);
}
let result = true;
result &&= this._validateFileSize(fileComponent, fileMeta.size);
result &&= this._validateFileType(fileComponent, fileMeta);
return result;
}