NAME

TLookupValidator - abstract base class for lookup-based validation

HIERARCHY

TObject
  TValidator
    TLookupValidator

SYNOPSIS

# This is an abstract base class.
# Subclass it and override lookup() to implement custom validation logic.

package MyLookupValidator;
use parent 'TUI::Validate::LookupValidator';

sub lookup {
  my ( $self, $s ) = @_;
  # perform your lookup logic
  return $found ? true : false;
}

DESCRIPTION

TLookupValidator is an abstract base class for validators that perform custom lookups to determine validity. It delegates isValid to a lookup method that subclasses must override. The default lookup returns true unconditionally, serving as a placeholder for concrete implementations.

METHODS

isValid

my $ok = $v->isValid( $s );

Delegates to lookup(), which subclasses must override.

lookup

my $ok = $v->lookup( $s );

Abstract method that subclasses must override. The default implementation in this class returns true unconditionally; this is a placeholder for concrete lookup validators (e.g., dictionary, enum, custom lookup table).

SEE ALSO

TValidator, TStringLookupValidator

AUTHORS

  • Borland International (original Turbo Vision design)

  • J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)

COPYRIGHT AND LICENSE

Copyright (c) 1990-1994, 1997 by Borland International

Copyright (c) 2026 the "AUTHORS" as listed above.

This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).