The parameters for validating the document link. This includes:
doctype: The type of document to validate the link for.docname: The name or identifier of the document to validate.fields (optional): An array of field names to be validated. If provided, only these fields will be checked for link validation.A promise that resolves to the result of the link validation. The result typically contains relevant information about the validation status or errors if any fields are invalid.
Validates the link to a document by checking the specified fields.
This function performs an asynchronous request to the server to validate the link to a document, based on the given
doctype,docname, and optionalfields. The validation ensures that the document referenced by the link exists and that the specified fields are correctly linked.Example
Example
Throws
Throws an error if the request fails or if there is an issue with validating the document link.