/
PMValidationEmailType.h
61 lines (39 loc) · 1.29 KB
/
PMValidationEmailType.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// PMValidationEmailType.h
//
//
// Created by Brett Walker on 6/8/12.
// Copyright (c) 2012-2016 Poet & Mountain, LLC. All rights reserved.
//
#import "PMValidationType.h"
/**
This validation class validates a target string as an e-mail address, determining whether it is well-formed.
*/
@interface PMValidationEmailType : PMValidationType
///----------------------------------
/// @name Creating an Instance
///----------------------------------
/**
Returns an auto-released instance of this class.
@discussion All subclasses should override this method to return an instance of the subclass.
*/
+ (instancetype) validator;
///---------------------
/// @name Identification
///---------------------
/**
Identifies the type of this class to a `PMValidationUnit` instance.
@discussion All subclasses should override this method to define their own type string.
*/
+ (NSString *)type;
///---------------------------
/// @name Validating an Object
///---------------------------
/**
Calling this method runs a validation pass on the provided text.
@param text The string to be validated.
@discussion Subclasses should override this method to provide their own validation.
@return A boolean representing the validation state.
*/
-(BOOL)isTextValid:(NSString *)text;
@end