Skip to content
This repository was archived by the owner on Oct 10, 2018. It is now read-only.
This repository was archived by the owner on Oct 10, 2018. It is now read-only.

Using api-check methods within custom checker #34

Description

@tnrich

Hey @kentcdodds,

I was hoping I could use api-check methods within a custom checker. Perhaps something sort of like this:

   randomData: function (val, name, location) {
        ac.throw([
            ac.shape({
                "name": ac.string,
                "site": ac.string,
                "forwardRegex": ac.string,
                "reverseRegex": ac.string,
                "cutType": ac.number,
                "dsForward": ac.number,
                "dsReverse": ac.number,
                "usForward": ac.number,
                "usReverse": ac.number
            })
        ], val);
    },

But I wasn't sure how to go about doing so exactly..
Is there a good way of doing this?

Thanks for all your time! It is much appreciated!
Thomas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions