The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Form::Tiny::Strict - mark input with extra data as invalid

SYNOPSIS

        # in your form class
        use Form::Tiny -strict;

        # optional - 1 by default, 0 turns strict checking off
        sub build_strict { 0 }

DESCRIPTION

This is a simple role that will cause any extra data on input to fail the form validation.

For example, if your form contains many optional fields which change often, you may want to ensure that your users are not sending anything you're not going to handle. This can help debugging and prevent errors.

ADDED INTERFACE

ATTRIBUTES

strict

Stores a single boolean, which determines if strict checking is turned on. Turning it off effectively disables the role.

writer: set_strict

METHODS

build_strict

This method should return the default value for the strict attribute.

It is optional and returns 1 by default.