package QBit::WebInterface::Controller::BEMHTML::Form::Field::email;

use qbit;

use base qw(QBit::WebInterface::Controller::BEMHTML::Form::Field::input);

sub init {
    my ($self) = @_;

    $self->SUPER::init();

    $self->{'hint'} = 'name@example.com';
}

sub check {
    my ($self) = @_;

    throw Exception::Form gettext('Invalid E-Mail') unless check_email($self->value);
}

1;
