PostalCodeValidator alternatives and similar libraries
Based on the "Text" category.
Alternatively, view PostalCodeValidator alternatives based on common mentions on social networks and blogs.
-
YYText
Powerful text framework for iOS to display and edit rich text. -
Nimbus
The iOS framework that grows only as fast as its documentation -
DTCoreText
Methods to allow using HTML code with CoreText -
PhoneNumberKit
A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber. -
ZSSRichTextEditor
A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view -
Twitter Text Obj
Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform. -
FontAwesomeKit
Icon font library for iOS. Currently supports Font-Awesome, Foundation icons, Zocial, and ionicons. -
libPhoneNumber-iOS
iOS port from libphonenumber (Google's phone number handling library) -
SwiftRichString
👩🎨 Elegant Attributed String composition in Swift sauce -
TwitterTextEditor
A standalone, flexible API that provides a full-featured rich text editor for iOS applications. -
RichEditorView
RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing. -
Down
Blazing fast Markdown / CommonMark rendering in Swift, built upon cmark. -
TextAttributes
An easier way to compose attributed strings -
SwiftyMarkdown
Converts Markdown files and strings into NSAttributedStrings with lots of customisation options. -
FontAwesome.swift
Use FontAwesome in your Swift projects -
SwiftString
A comprehensive, lightweight string extension for Swift -
Iconic
:art: Auto-generated icon font library for iOS, watchOS and tvOS -
SwiftyAttributes
A Swifty API for attributed strings -
MMMarkdown
An Objective-C framework for converting Markdown to HTML. -
Atributika
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement. -
CocoaMarkdown
Markdown parsing and rendering for iOS and OS X -
SwiftIconFont
Icons fonts for iOS (Font Awesome 5, Iconic, Ionicon, Octicon, Themify, MapIcon, MaterialIcon, Foundation 3, Elegant Icon, Captain Icon) -
FontBlaster
Programmatically load custom fonts into your iOS, macOS and tvOS app. -
Notepad
[iOS] A fully themeable markdown editor with live syntax highlighting. -
Font-Awesome-Swift
Font Awesome swift library for iOS. -
fuse-swift
A lightweight fuzzy-search library, with zero dependencies -
MarkdownKit
A simple and customizable Markdown Parser for Swift -
FormatterKit
stringWithFormat: for the sophisticated hacker set -
NSStringEmojize
A category on NSString to convert Emoji Cheat Sheet codes to their equivalent Unicode characters -
MarkdownTextView
Rich Markdown editing control for iOS -
Mustard
🌭 Mustard is a Swift library for tokenizing strings when splitting by whitespace doesn't cut it. -
Guitar
A Cross-Platform String and Regular Expression Library written in Swift. -
Translucid
Lightweight library to set an Image as text background. Written in swift. -
GoogleMaterialDesignIcons
Google Material Design Icons Font for iOS -
Heimdall
Heimdall is a wrapper around the Security framework for simple encryption/decryption operations. -
AttributedTextView
Easiest way to create an attributed UITextView (with support for multiple links and from html) -
Apodimark
Fast, flexible markdown parser written in Swift.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of PostalCodeValidator or a related project?
README
PostalCodeValidator
A validator for postal codes with support for 200+ regions.
import Foundation
import PostalCodeValidator
if let validator = PostalCodeValidator(locale: .current) { // United States (US)
validator.validate(postalCode: "95014")) // true
validator.validate(postalCode: "22162-1010") // true
validator.validate(postalCode: "1234567")) // false
validator.validate(postalCode: "INVALID")) // false
}
// 248 regions supported
if let validator = PostalCodeValidator(regionCode: "JP") { // Japan (JP)
validator.validate(postalCode: "154-0023")) // true
validator.validate(postalCode: "12345") // false
}
Note: Only the region of a locale is used to determine validation rules. To validate the postal code for a particular region, you can construct a locale using an identifier with the
"und"
language code.
Requirements
- Swift 4.0+
Installation
Swift Package Manager
Add the PostalCodeValidator package to your target dependencies in Package.swift
:
import PackageDescription
let package = Package(
name: "YourProject",
dependencies: [
.package(
url: "https://github.com/FormatterKit/PostalCodeValidator",
from: "0.1.0"
),
]
)
Then run the swift build
command to build your project.
Known Issues
- Armed forces in Germany (and likely other countries) use special postal codes, which aren't included in the upstream data source. This will cause validation of these postal codes to fail. so validation will fail for these postal codes. (Thanks for pointing this out, @timohetzel)
Additional Details
The CLDR previously maintained a list of postal code formats, but that information was deprecated in v27.
Following the guidance of the
twitter-cldr-rb project,
PostalCodeValidator
sources its information from http://i18napis.appspot.com.
The most recent release of this software uses
information retrieved from the website on November 27, 2019.
License
MIT
Contact
Mattt (@mattt)
*Note that all licence references and agreements mentioned in the PostalCodeValidator README section above
are relevant to that project's source code only.