---
source: crates/aiken-lang/src/parser/definition/validator.rs
description: "Code:\n\nvalidator {\n  fn foo(datum, rdmr, ctx) {\n    True\n  }\n}\n"
---
Validator(
    Validator {
        doc: None,
        end_position: 54,
        fun: Function {
            arguments: [
                Arg {
                    arg_name: Named {
                        name: "datum",
                        label: "datum",
                        location: 21..26,
                        is_validator_param: false,
                    },
                    location: 21..26,
                    annotation: None,
                    doc: None,
                    tipo: (),
                },
                Arg {
                    arg_name: Named {
                        name: "rdmr",
                        label: "rdmr",
                        location: 28..32,
                        is_validator_param: false,
                    },
                    location: 28..32,
                    annotation: None,
                    doc: None,
                    tipo: (),
                },
                Arg {
                    arg_name: Named {
                        name: "ctx",
                        label: "ctx",
                        location: 34..37,
                        is_validator_param: false,
                    },
                    location: 34..37,
                    annotation: None,
                    doc: None,
                    tipo: (),
                },
            ],
            body: Var {
                location: 45..49,
                name: "True",
            },
            doc: None,
            location: 14..38,
            name: "foo",
            public: false,
            return_annotation: None,
            return_type: (),
            end_position: 52,
            can_error: true,
        },
        other_fun: None,
        location: 0..9,
        params: [],
    },
)
