01: /*
02: * File : $Source: /usr/local/cvs/alkacon/com.alkacon.opencms.formgenerator/src/com/alkacon/opencms/formgenerator/CmsEmailField.java,v $
03: * Date : $Date: 2007-12-21 14:34:00 $
04: * Version: $Revision: 1.1 $
05: *
06: * This file is part of the Alkacon OpenCms Add-On Module Package
07: *
08: * Copyright (c) 2007 Alkacon Software GmbH (http://www.alkacon.com)
09: *
10: * The Alkacon OpenCms Add-On Module Package is free software:
11: * you can redistribute it and/or modify
12: * it under the terms of the GNU General Public License as published by
13: * the Free Software Foundation, either version 3 of the License, or
14: * (at your option) any later version.
15: *
16: * The Alkacon OpenCms Add-On Module Package is distributed
17: * in the hope that it will be useful,
18: * but WITHOUT ANY WARRANTY; without even the implied warranty of
19: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20: * GNU General Public License for more details.
21: *
22: * You should have received a copy of the GNU General Public License
23: * along with the Alkacon OpenCms Add-On Module Package.
24: * If not, see http://www.gnu.org/licenses/.
25: *
26: * For further information about Alkacon Software GmbH, please see the
27: * company website: http://www.alkacon.com.
28: *
29: * For further information about OpenCms, please see the
30: * project website: http://www.opencms.org.
31: */
32: package com.alkacon.opencms.formgenerator;
33:
34: /**
35: * Represents a text input field for an email address.<p>
36: *
37: * @author Thomas Weckert
38: *
39: * @version $Revision: 1.1 $
40: *
41: * @since 7.0.4
42: */
43: public class CmsEmailField extends CmsTextField {
44:
45: /** HTML field type: email field. */
46: private static final String TYPE = "email";
47:
48: /** Regular expression to validate email addresses. */
49: public static final String VALIDATION_REGEX = "(\\w[-._\\w]*\\w@\\w[-._\\w]*\\w\\.\\w{2,4})";
50:
51: /**
52: * @see com.alkacon.opencms.formgenerator.I_CmsField#getType()
53: */
54: public String getType() {
55:
56: return TYPE;
57: }
58:
59: /**
60: * Returns the type of the input field, e.g. "text" or "select".<p>
61: *
62: * @return the type of the input field
63: */
64: public static String getStaticType() {
65:
66: return TYPE;
67: }
68:
69: }
|