mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 15:25:20 +00:00
Added NFC_INVALID message
This commit is contained in:
@@ -26,7 +26,8 @@ const debugMessages: MessageGroup = {
|
|||||||
BRC_AUTC_MISSING_DATA: "Unable to autogenerate barcodes. Data is not a string.",
|
BRC_AUTC_MISSING_DATA: "Unable to autogenerate barcodes. Data is not a string.",
|
||||||
BRC_BW_FORMAT_UNSUPPORTED: "This format is not supported (by Apple) for backward support. Please choose another one.",
|
BRC_BW_FORMAT_UNSUPPORTED: "This format is not supported (by Apple) for backward support. Please choose another one.",
|
||||||
BRC_NO_POOL: "Cannot set barcode: no barcodes found. Please set barcodes first. Barcode is for retrocompatibility only.",
|
BRC_NO_POOL: "Cannot set barcode: no barcodes found. Please set barcodes first. Barcode is for retrocompatibility only.",
|
||||||
DATE_FORMAT_UNMATCH: "%s was not set due to incorrect date format."
|
DATE_FORMAT_UNMATCH: "%s was not set due to incorrect date format.",
|
||||||
|
NFC_INVALID: "Unable to set NFC properties: data not compliant with schema."
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -442,8 +442,8 @@ export class Pass implements PassIndexSignature {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(typeof data === "object" && !Array.isArray(data) && schema.isValid(data, "nfcDict"))) {
|
if (!(data && typeof data === "object" && !Array.isArray(data) && schema.isValid(data, "nfcDict"))) {
|
||||||
genericDebug("Invalid NFC data provided");
|
genericDebug(formatMessage("NFC_INVALID"));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user