Latest 1.0.0
License MIT
Platforms ios 11.0

Nepali Phone Number

Version Carthage compatible License Platform


Nepali Phone Number is a simplified phone number formatter written in swift.
Look into project example to see it in action!


  • Xcode 9.
  • iOS 9 or higher.



CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

pod 'NepaliPhoneNumber'

Then, run the following command:

$ pod install


Things you can do after installation

let aPhone = "9845045191"
        let bPhone = "9856022530"
        let cPhone = "9801031117"
        let dPhone = "9741151609"

        let aLandline = "14350994"
        let bLandline = "83551338"

        // For Phone
        // Check is valid Phone number or not
        print(NepaliPhoneNumber.isValid(phone: aPhone))
        print(NepaliPhoneNumber.isValid(phone: bPhone))
        print(NepaliPhoneNumber.isValid(phone: bLandline))

        // Print formatted String and can supply any formatter character
        // May be space or a hyphen
        // Your choice
        print(NepaliPhoneNumber.formattedNumber(phone: aPhone, formatter: " "))
        print(NepaliPhoneNumber.formattedNumber(phone: bLandline, formatter: " "))

        // For Mobile
        // Verify Mobile Number
        print(NepaliPhoneNumber.isValid(phone: cPhone))
        print(NepaliPhoneNumber.isValid(phone: dPhone))

        // Can fetch the Name of Company and Type of Sim from the given number.
        print(NepaliPhoneNumber.formattedNumber(mobile: cPhone, formatter: " "))
        print(NepaliPhoneNumber.getTheNumberDetail(mobile: cPhone)?
        print(NepaliPhoneNumber.getTheNumberDetail(mobile: cPhone)?
        print(NepaliPhoneNumber.getTheNumberDetail(mobile: dPhone)?
        print(NepaliPhoneNumber.getTheNumberDetail(mobile: dPhone)?

        // For Land Line
        // Area Code also needed to be passed to get verified.
        print(NepaliPhoneNumber.isValid(phone: aLandline))
        print(NepaliPhoneNumber.isValid(phone: bLandline))

        // Print formatted LandLine Number
        print(NepaliPhoneNumber.formattedNumber(landLine: aLandline, formatter: "-"))
        print(NepaliPhoneNumber.formattedNumber(landLine: bLandline, formatter: "-"))



Free Software, Hell Yeah!

Latest podspec

    "name": "NepaliPhoneNumber",
    "version": "1.0.0",
    "summary": "Phone Number | Formatter | Validator",
    "description": "Nepali Phone Number is a simplified phone number formatter written in swift. Look into project example to see it in action!",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": ""
    "authors": {
        "Aashish Adhikari": "[email protected]"
    "platforms": {
        "ios": "11.0"
    "swift_version": "4.1",
    "source": {
        "git": "",
        "tag": "1.0.0"
    "source_files": "NepaliPhoneNumber/**/*.{h,m,swift}",
    "exclude_files": "Classes/Exclude"

Pin It on Pinterest

Share This