mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
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
|