https://github.com/imryan/validatorpizza-ios
🍕 iOS wrapper for the simple disposable email hunter and validator
https://github.com/imryan/validatorpizza-ios
disposable-email email email-validation validatorpizza
Last synced: 9 months ago
JSON representation
🍕 iOS wrapper for the simple disposable email hunter and validator
- Host: GitHub
- URL: https://github.com/imryan/validatorpizza-ios
- Owner: imryan
- License: mit
- Created: 2017-06-30T22:16:20.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-06T15:37:34.000Z (about 8 years ago)
- Last Synced: 2025-02-24T08:04:08.327Z (over 1 year ago)
- Topics: disposable-email, email, email-validation, validatorpizza
- Language: Objective-C
- Homepage: https://validator.pizza
- Size: 14.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Validator.pizza iOS
🍕 Bite-sized iOS wrapper for the simple disposable email hunter and validator.
[](https://travis-ci.org/imryan/validatorpizza-ios)
[](http://cocoapods.org/pods/ValidatorPizza)
[](http://cocoapods.org/pods/ValidatorPizza)
[](http://cocoapods.org/pods/ValidatorPizza)
# Usage
```objective-c
// Validating a domain
[ValidatorPizza check:@"example.com" type:VPCheckTypeDomain block:^(BOOL isValid, NSDictionary *results, NSError *error) {
if (!error) ...
}];
// Validating an email address
[ValidatorPizza check:@"me@example.com" type:VPCheckTypeEmail block:^(BOOL isValid, NSDictionary *results, NSError *error) {
if (!error) ...
}];
```
## Response
Result dictionaries contain a structure such as:
```json
// Valid email
{
"status": 200,
"email": "email@example.com",
"domain": "example.com",
"mx": false,
"disposable": false,
"alias": false,
"did_you_mean": false,
"remaining_requests": 119
}
```
```json
// Invalid email
{
"status": 400,
"error": "The email address is invalid."
}
```
```json
// Requests limit reached
{
"status": 429,
"error": "Rate limit exceeded."
}
```
## Author
Ryan Cohen, notryancohen@gmail.com
## License
ValidatorPizza is available under the MIT license. See the LICENSE file for more info.