MCPcopy Create free account
hub / github.com/react-dropzone/react-dropzone / validator

Function validator

src/index.spec.js:3659–3664  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

3657 describe("validator", () => {
3658 it("rejects with custom error", async () => {
3659 const validator = (file) => {
3660 if (/dogs/i.test(file.name))
3661 return { code: "dogs-not-allowed", message: "Dogs not allowed" };
3662
3663 return null;
3664 };
3665
3666 const onDropSpy = jest.fn();
3667

Callers 2

useDropzoneFunction · 0.85
allFilesAcceptedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…