[
    {
        "name": "Field",
        "comment": " A `Field` is a simple data type that helps capture and validate form data better.\nThe left side of a field represents a function that takes in a value of arbitrary type,\nvalidates it and returns a `ValidationResult`.\nThe `ValidationResult` can contain the value of the field if the validation `Passed`, or\nan error if the validation `Failed`\n\n\n# Definition\n\n@docs Field\n\n\n# Helpers\n\n@docs value, update, validate, validateAll, isValid, isAllValid\n\n\n# Mapping\n\n@docs map\n\n",
        "unions": [
            {
                "name": "Field",
                "comment": " Type that helps capture and validate form data better\n",
                "args": [
                    "e",
                    "v"
                ],
                "cases": [
                    [
                        "Field",
                        [
                            "v -> ValidationResult e v",
                            "v"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "isAllValid",
                "comment": " Check if all Fields in the list are valid\n",
                "type": "List (Field e v) -> Bool"
            },
            {
                "name": "isValid",
                "comment": " Check if a Field is valid\n",
                "type": "Field e v -> Bool"
            },
            {
                "name": "map",
                "comment": " Map over a Field\n",
                "type": "(v -> v) -> Field e v -> Field e v"
            },
            {
                "name": "update",
                "comment": " Update the value of a Field\n",
                "type": "Field e v -> v -> Field e v"
            },
            {
                "name": "validate",
                "comment": " Validate a Field and get a `ValidationResult`\n",
                "type": "Field e v -> ValidationResult e v"
            },
            {
                "name": "validateAll",
                "comment": " Validate a List of Fields and get a List of `ValidationResult`\n",
                "type": "List (Field e v) -> List (ValidationResult e v)"
            },
            {
                "name": "value",
                "comment": " Extract the value out of a Field\n",
                "type": "Field e v -> v"
            }
        ],
        "binops": []
    },
    {
        "name": "Field.ValidationResult",
        "comment": "\n\n\n# Definition\n\n@docs ValidationResult\n\n\n# Mapping\n\n@docs map, contraMap\n\n\n# Chaining\n\n@docs andThen\n\n\n# Helpers\n\n@docs filterFailures, filterPassed\n\n",
        "unions": [
            {
                "name": "ValidationResult",
                "comment": " A `ValidationResult` describes the state of a `Field` once it has been validated.\nIt can contain the value of the field if the validation `Passed` or\nan error if the validation `Failed`\n",
                "args": [
                    "e",
                    "v"
                ],
                "cases": [
                    [
                        "Passed",
                        [
                            "v"
                        ]
                    ],
                    [
                        "Failed",
                        [
                            "e"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "andThen",
                "comment": " Chain multiple validation functions\n",
                "type": "(v -> ValidationResult e v) -> ValidationResult e v -> ValidationResult e v"
            },
            {
                "name": "contraMap",
                "comment": " Apply a function to a `ValidationResult`. If the `ValidationResult` is `Failed`, it will be converted.\nif the `ValidationResult` has `Passed` then the passed state will propogate\n",
                "type": "(a -> b) -> ValidationResult a x -> ValidationResult b x"
            },
            {
                "name": "filterFailures",
                "comment": " Get all ValidationResults that Failed\n",
                "type": "List (ValidationResult e v) -> List (ValidationResult e v)"
            },
            {
                "name": "filterPassed",
                "comment": " Get all ValidationResults that Passed\n",
                "type": "List (ValidationResult e v) -> List (ValidationResult e v)"
            },
            {
                "name": "map",
                "comment": " Apply a function to a `ValidationResult`. If the `ValidationResult` is `Passed`, it will be converted.\nif the `ValidationResult` has `Failed` then the failure will propogate\n",
                "type": "(a -> b) -> ValidationResult x a -> ValidationResult x b"
            }
        ],
        "binops": []
    }
]