domainvalidator.cpp

Go to the documentation of this file.
00001 /*
00002 **  This file is part of Vidalia, and is subject to the license terms in the
00003 **  LICENSE file, found in the top level directory of this distribution. If you
00004 **  did not receive the LICENSE file with this file, you may obtain it from the
00005 **  Vidalia source package distributed by the Vidalia Project at
00006 **  http://www.vidalia-project.net/. No part of Vidalia, including this file,
00007 **  may be copied, modified, propagated, or distributed except according to the
00008 **  terms described in the LICENSE file.
00009 */
00010 
00011 /*
00012 ** \file domainvalidator.cpp
00013 ** \version $Id: domainvalidator.cpp 2362 2008-02-29 04:30:11Z edmanm $
00014 ** \brief Validates that a given domain name is (probably) valid
00015 */
00016 
00017 #include "domainvalidator.h"
00018 
00019 
00020 /** Regular expression to validate that input is a valid IP address. */
00021 #define DOMAIN_REGEXP \
00022 "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$"
00023 
00024 
00025 /** Constructor. */
00026 DomainValidator::DomainValidator(QObject *parent)
00027 : QRegExpValidator(QRegExp(DOMAIN_REGEXP), parent)
00028 {
00029 }
00030 

Generated on Wed Nov 26 21:02:42 2008 for Vidalia by  doxygen 1.5.7.1