All Projects → Udokah → naija-phone-number

Udokah / naija-phone-number

Licence: other
A fast minimal module to validate Nigerian mobile phone numbers using Regular Expressions.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to naija-phone-number

rust-phonenumber
Library for parsing, formatting and validating international phone numbers.
Stars: ✭ 99 (+130.23%)
Mutual labels:  phone-number, validator
Stringformatter
Simple Text Formetter (Credit Card Number, Phone Number, Serial Number etc.) Can be used in all text inputs according to the format pattern. If desired, large minor character restrictions can be made in the format pattern.
Stars: ✭ 231 (+437.21%)
Mutual labels:  phone-number, validator
formurai
Lightweight and powerfull library for declarative form validation
Stars: ✭ 49 (+13.95%)
Mutual labels:  validator
SheenValidator
Android library to make form validation easier
Stars: ✭ 29 (-32.56%)
Mutual labels:  validator
magento2-sign-in-with-phone-number
This extension allow your customers to login to your Magento store using their phone number.
Stars: ✭ 42 (-2.33%)
Mutual labels:  phone-number
vayder
Easy and concise validations for Express routes
Stars: ✭ 26 (-39.53%)
Mutual labels:  validator
validator
Yii validator library
Stars: ✭ 47 (+9.3%)
Mutual labels:  validator
volder
volder is powerful Object schema validation lets you describe your data using a simple and readable schema and transform a value to match the requirements
Stars: ✭ 106 (+146.51%)
Mutual labels:  validator
validate-framework
validate-framework:一款轻量、无依赖的 JavaScript 验证组件
Stars: ✭ 55 (+27.91%)
Mutual labels:  validator
romans
A Simple PHP Roman Numerals Library
Stars: ✭ 40 (-6.98%)
Mutual labels:  validator
KValidation
Validation library. Fluent syntax in Java, mini DSL in Kotlin
Stars: ✭ 20 (-53.49%)
Mutual labels:  validator
max-validator
Advanced validation library for Javascript & React | Inspired by laravel validation
Stars: ✭ 29 (-32.56%)
Mutual labels:  validator
swagger-object-validator
Node-Module to validate your model against a swagger spec and receive in-depth error traces
Stars: ✭ 27 (-37.21%)
Mutual labels:  validator
Reborn
ReborN SMS BOMBER | SpeedX & 4NAT
Stars: ✭ 126 (+193.02%)
Mutual labels:  phone-number
Natours
An awesome tour booking web app written in NodeJS, Express, MongoDB 🗽
Stars: ✭ 94 (+118.6%)
Mutual labels:  validator
validator
Inpsyde Validator library
Stars: ✭ 14 (-67.44%)
Mutual labels:  validator
codeowners-validator
The GitHub CODEOWNERS file validator
Stars: ✭ 142 (+230.23%)
Mutual labels:  validator
botkit-sms
Twilio Programmable SMS implementation for Botkit.
Stars: ✭ 18 (-58.14%)
Mutual labels:  phone-number
PhoneNumberKit
Android Kotlin library to parse and format international phone numbers. Country code picker.
Stars: ✭ 124 (+188.37%)
Mutual labels:  phone-number
govalidators
struct 验证器,内置大部分常用验证,可自定义
Stars: ✭ 56 (+30.23%)
Mutual labels:  validator

npm version Build Status

Naija Phone Number

A fast minimal module to validate Nigerian mobile phone numbers using Regular Expressions.

Installation

$ npm install naija-phone-number --save

Usage

This module assumes that you already know that Nigerian numbers are prefixed by +234 and you should not expect your users to type that. Instead your UI should look something like this.

     |**********************|
+234 |  phone number here   |
     |**********************|

Now that we've gotten this out of the way here's an example

const naijaNumber = require('naija-phone-number');

let phoneInput = document.querySelector('#phone-input').value;

naijaNumber.isValid(phoneInput); // true or false

Also

// 12 digit numbers
naijaNumber.isValid('070328582392'); // true

// pass argument as Number
naijaNumber.isValid(081928582392); // true

// Unknown provider
naijaNumber.isValid(050728582392); // false

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].