bd_sim_validator

A Dart package to validate, detect operators, and format Bangladeshi phone numbers.

Features

  • ✅ Validate BD phone numbers
  • ✅ Detect operator (GP, Robi, Banglalink, Teletalk, Airtel)
  • ✅ Format to local (01X) or international (+880) style
  • ✅ Zero dependencies

Installation

dependencies:
  bd_sim_validator: ^1.0.3

Usage

import 'package:bd_sim_validator/bd_sim_validator.dart';

// Validate
BDPhoneValidator.isValid('01711111111'); // true

// Detect Operator
OperatorDetector.detect('01711111111'); // BDOperator.grameenphone

// Format
BDPhoneFormatter.toInternational('01711111111'); // +8801711111111
BDPhoneFormatter.toLocal('+8801711111111');       // 01711111111

Libraries

bd_sim_validator
A Dart package to validate and detect operators of Bangladeshi phone numbers.