Kernel::System::DataValidation::Validator::Options

NAME

Kernel::System::DataValidation::Validator::Options – Validator that verifies that a value matches given options.

PUBLIC INTERFACE

Provides a Check method, that will be called by the Kernel::System::DataValidation backend.

Check()

Checks if the given value is a valid option. The options needs to be passed as the Arguments parameter.

    my $True = $Validator->Check(
        Arguments => [ 'Option1', 'Option2' ],
        Value     => 'Option1',
    );

    my $False = $Validator->Check(
        Arguments => [ 'Option1', 'Option2' ],
        Value     => 'Option3',
    );
Scroll to Top