{
    "content": [
        {
            "type": "text",
            "text": "# Data::FormValidator::Results (info)\n\n## NAME\n\nData::FormValidator::Results - results of form input validation.\n\n## SYNOPSIS\n\nmy $results = Data::FormValidator->check(\\%inputhash, \\%dfvprofile);\n# Print the name of missing fields\nif ( $results->hasmissing ) {\nfor my $f ( $results->missing ) {\nprint $f, \" is missing\\n\";\n}\n}\n# Print the name of invalid fields\nif ( $results->hasinvalid ) {\nfor my $f ( $results->invalid ) {\nprint $f, \" is invalid: \", $results->invalid( $f ), \"\\n\";\n}\n}\n# Print unknown fields\nif ( $results->hasunknown ) {\nfor my $f ( $results->unknown ) {\nprint $f, \" is unknown\\n\";\n}\n}\n# Print valid fields\nfor my $f ( $results->valid() ) {\nprint $f, \" =  \", $results->valid( $f ), \"\\n\";\n}\n\n## DESCRIPTION\n\nThis object is returned by the Data::FormValidator \"check\" method.  It\ncan be queried for information about the validation results.\n\n## Sections\n\n- **Data::FormValidator::RUsertContributed Perl DData::FormValidator::Results(3pm)**\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Data::FormValidator::Results",
        "section": "",
        "mode": "info",
        "summary": "Data::FormValidator::Results - results of form input validation.",
        "synopsis": "my $results = Data::FormValidator->check(\\%inputhash, \\%dfvprofile);\n# Print the name of missing fields\nif ( $results->hasmissing ) {\nfor my $f ( $results->missing ) {\nprint $f, \" is missing\\n\";\n}\n}\n# Print the name of invalid fields\nif ( $results->hasinvalid ) {\nfor my $f ( $results->invalid ) {\nprint $f, \" is invalid: \", $results->invalid( $f ), \"\\n\";\n}\n}\n# Print unknown fields\nif ( $results->hasunknown ) {\nfor my $f ( $results->unknown ) {\nprint $f, \" is unknown\\n\";\n}\n}\n# Print valid fields\nfor my $f ( $results->valid() ) {\nprint $f, \" =  \", $results->valid( $f ), \"\\n\";\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Data::FormValidator::RUsertContributed Perl DData::FormValidator::Results(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 28,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 131,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "Data::FormValidator::RUsertContributed Perl DData::FormValidator::Results(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Data::FormValidator::Results - results of form input validation.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $results = Data::FormValidator->check(\\%inputhash, \\%dfvprofile);\n\n# Print the name of missing fields\nif ( $results->hasmissing ) {\nfor my $f ( $results->missing ) {\nprint $f, \" is missing\\n\";\n}\n}\n\n# Print the name of invalid fields\nif ( $results->hasinvalid ) {\nfor my $f ( $results->invalid ) {\nprint $f, \" is invalid: \", $results->invalid( $f ), \"\\n\";\n}\n}\n\n# Print unknown fields\nif ( $results->hasunknown ) {\nfor my $f ( $results->unknown ) {\nprint $f, \" is unknown\\n\";\n}\n}\n\n# Print valid fields\nfor my $f ( $results->valid() ) {\nprint $f, \" =  \", $results->valid( $f ), \"\\n\";\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This object is returned by the Data::FormValidator \"check\" method.  It\ncan be queried for information about the validation results.\n\nsuccess();\nThis method returns true if there were no invalid or missing fields,\nelse it returns false.\n\nAs a shorthand, When the $results object is used in boolean context, it\nis overloaded to use the value of success() instead. That allows\ncreation of a syntax like this one used in\n\"CGI::Application::Plugin::ValidateRM\":\n\nmy $results = $self->checkrm('formdisplay','formprofile') || return $self->dfverrorpage;\n\nvalid( [[field] [, value]] );\nIn list context with no arguments, it returns the list of fields which\ncontain valid values:\n\n@allvalidfieldnames = $r->valid;\n\nIn a scalar context with no arguments, it returns an hash reference\nwhich contains the valid fields as keys and their input as values:\n\n$allvalidhref = $r->valid;\n\nIf called with one argument in scalar context, it returns the value of\nthat \"field\" if it contains valid data, \"undef\" otherwise. The value\nwill be an array ref if the field had multiple values:\n\n$value = $r->valid('field');\n\nIf called with one argument in list context, it returns the values of\n\"field\" as an array:\n\n@values = $r->valid('field');\n\nIf called with two arguments, it sets \"field\" to \"value\" and returns\n\"value\".  This form is useful to alter the results from within some\nconstraints.  See the Data::FormValidator::Constraints documentation.\n\n$newvalue = $r->valid('field',$newvalue);\n\nhasmissing()\nThis method returns true if the results contain missing fields.\n\nmissing( [field] )\nIn list context it returns the list of fields which are missing.  In a\nscalar context, it returns an array reference to the list of missing\nfields.\n\nIf called with an argument, it returns true if that \"field\" is missing,\nundef otherwise.\n\nhasinvalid()\nThis method returns true if the results contain fields with invalid\ndata.\n\ninvalid( [field] )\nIn list context, it returns the list of fields which contains invalid\nvalue.\n\nIn a scalar context, it returns an hash reference which contains the\ninvalid fields as keys, and references to arrays of failed constraints\nas values.\n\nIf called with an argument, it returns the reference to an array of\nfailed constraints for \"field\".\n\nhasunknown()\nThis method returns true if the results contain unknown fields.\n\nunknown( [field] )\nIn list context, it returns the list of fields which are unknown.  In a\nscalar context, it returns an hash reference which contains the unknown\nfields and their values.\n\nIf called with an argument, it returns the value of that \"field\" if it\nis unknown, undef otherwise.\n\nmsgs([config parameters])\nThis method returns a hash reference to error messages. The exact\nformat is determined by parameters in the \"msgs\" area of the validation\nprofile, described in the Data::FormValidator documentation.\n\nNOTE: the \"msgs\" parameter in the profile can take a code reference as\na value, allowing complete control of how messages are generated. If\nsuch a code reference was provided there, it will be called here\ninstead of the usual processing, described below. It will receive as\narguments the Data::FormValidator::Results object and a hash reference\nof control parameters.\n\nThe hashref passed in should contain the same options that you can\ndefine in the validation profile. This allows you to separate the\ncontrols for message display from the rest of the profile. While\nvalidation profiles may be different for every form, you may wish to\nformat messages the same way across many projects.\n\nControls passed into the <msgs> method will be applied first, followed\nby ones applied in the profile. This allows you to keep the controls\nyou pass to \"msgs\" as \"global\" and override them in a specific profile\nif needed.\n\nmeta()\nIn a few cases, a constraint may discover meta data that is useful to\naccess later. For example, when using\nData::FormValidator::Constraints::Upload, several bits of meta data are\ndiscovered about files in the process of validating. These can include\n\"bytes\", \"width\", \"height\" and \"extension\".  The \"meta()\" function is\nused by constraint methods to set this data. It's also used to access\nthis data. Here are some examples.\n\n# return all field names that have meta data\nmy @fields = $results->meta();\n\n# To retrieve all meta data for a field:\n$metahref = $results->meta('img');\n\n# Access a particular piece:\n$width = $results->meta('img')->{width};\n\nHere's how to set some meta data. This is useful to know if you are\nwriting your own complex constraint.\n\n$self->meta('img', {\nwidth  => '50',\nheight => '60',\n});\n\nThis function does not currently support multi-valued fields. If it\ndoes in the future, the above syntax will still work.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Data::FormValidator, Data::FormValidator::Filters,\nData::FormValidator::Constraints,\nData::FormValidator::ConstraintsFactory\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Author: Francis J. Lacoste <francis.lacoste@iNsu.COM> Maintainer: Mark\nStosberg <mark@summersault.com>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 1999,2000 iNsu Innovations Inc.  All rights reserved.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms as perl itself.\n\nperl v5.26.1                      2017-10-24 Data::FormValidator::Results(3pm)",
                "subsections": []
            }
        }
    }
}