1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 """String validator for e-mail addresses."""
17
18 from muntjac.data.validators.regexp_validator import RegexpValidator
19
20
22 """String validator for e-mail addresses. The e-mail address syntax is not
23 complete according to RFC 822 but handles the vast majority of valid e-mail
24 addresses correctly.
25
26 See L{AbstractStringValidator} for more information.
27
28 @author: Vaadin Ltd.
29 @author: Richard Lincoln
30 @version: 1.1.2
31 """
32
34 """Creates a validator for checking that a string is a syntactically
35 valid e-mail address.
36
37 @param errorMessage:
38 the message to display in case the value does not validate.
39 """
40 super(EmailValidator, self).__init__(('^([a-zA-Z0-9_\\.\\-+])+'
41 '@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$'), True, errorMessage)
42