NAME

Data::Transpose::Validator::Group - Class for grouped field

SYNOPSIS

METHODS

new(name => "name", fields => [$obj1, $obj2, ... ])

fields

Return an arrayref of the objects set in the constructor. This is read only.

name

Return the name set in the constructor. This is read only. If you want a sensible default error string, you should set this to something that concatenated with "%s differ" makes sense.

E.g. "passwords" will produce such an error: "Passwords differ!";

equal

Set to a true value if the check for equality is needed. Defaults to true, and so far it's the only use of this module.

is_valid

Returns true if the group validates. If no check were done (because, e.g. you set equal => 0) this method returns true but sets a warning, which you can retrieve with -warnings.