MCPcopy Create free account
hub / github.com/LibPDF-js/core / validateUniqueName

Method validateUniqueName

src/api/pdf-form.ts:1105–1109  ·  view source on GitHub ↗

* Validate that a field name is unique.

(name: string)

Source from the content-addressed store, hash-verified

1103 * Validate that a field name is unique.
1104 */
1105 private validateUniqueName(name: string): void {
1106 if (this.fieldsByName.has(name)) {
1107 throw new Error(`Field "${name}" already exists`);
1108 }
1109 }
1110
1111 /**
1112 * Build a default appearance (DA) string for text-based fields.

Callers 6

createSignatureFieldMethod · 0.95
createTextFieldMethod · 0.95
createCheckboxMethod · 0.95
createRadioGroupMethod · 0.95
createDropdownMethod · 0.95
createListboxMethod · 0.95

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected