Swiftgram/submodules/TelegramUI/TelegramUI/STPPostalCodeValidator.h
Peter b317aab568 Add 'submodules/TelegramUI/' from commit 'fa3ac0b61a27c8dd3296518a15891a6f9750cbf2'
git-subtree-dir: submodules/TelegramUI
git-subtree-mainline: 5c1613d1048026b9e00a6ce753775cef87eb53fa
git-subtree-split: fa3ac0b61a27c8dd3296518a15891a6f9750cbf2
2019-06-11 19:00:46 +01:00

27 lines
742 B
Objective-C
Executable File

//
// STPPostalCodeValidator.h
// Stripe
//
// Created by Ben Guo on 4/14/16.
// Copyright © 2016 Stripe, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, STPPostalCodeType) {
STPCountryPostalCodeTypeNumericOnly,
STPCountryPostalCodeTypeAlphanumeric,
STPCountryPostalCodeTypeNotRequired,
};
@interface STPPostalCodeValidator : NSObject
+ (BOOL)stringIsValidPostalCode:(nullable NSString *)string
type:(STPPostalCodeType)postalCodeType;
+ (BOOL)stringIsValidPostalCode:(nullable NSString *)string
countryCode:(nullable NSString *)countryCode;
+ (STPPostalCodeType)postalCodeTypeForCountryCode:(nullable NSString *)countryCode;
@end