mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00

git-subtree-dir: submodules/TelegramUI git-subtree-mainline: 5c1613d1048026b9e00a6ce753775cef87eb53fa git-subtree-split: fa3ac0b61a27c8dd3296518a15891a6f9750cbf2
27 lines
742 B
Objective-C
Executable File
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
|