Stefan Hornburg (Racke) > Data-Transpose-0.0006 > Data::Transpose::Validator::Set

Download:
Data-Transpose-0.0006.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Data-Transpose-0.0010

NAME ^

Data::Transpose::Validator::Set - Validate a string inside a set of values

METHODS ^

new(list => \@list, multiple => 1)

Constructor to set the list in which the value to be validated must be present.

is_valid($value, [ $value, $value, ... ] )

The validator. Returns a true value if the value (or the values) passed are all present in the set. Multiple values validate only if the multiple option is set in the constructor. It also accept an arrayref as single argument, if the multiple option is set.

INTERNAL METHODS ^

wants_multiple

Accessor to the multiple option

list

Accessor to the list of values, as an hash.

syntax highlighting: