Features

A Flutter package to validate phone numbers based on country code. Supports validation for all countries.

Getting started

To use this package:

Run this command:

flutter pub add validate_phone_number

Or, add the following to your pubspec.yaml file:

dependencies:
validate_phone_number: ^1.1.0

Usage

Import it Now in your Dart code, you can use:

import 'package:validate_phone_number/validate_phone_number.dart';

How to Use Simply use this method, and pass the required params:

Validator.validatePhoneNumber(
'1234567890', //without country code
'IN',
) //it will return true or false. See example for better clarity.