validatePhone function

bool validatePhone(
  1. String phone
)

Validates a Pakistani mobile phone number.

Accepts local (03001234567), international (+923001234567, +92 (0) 300…) and short (3001234567) formats, with common separators and Urdu digits. The 03XX prefix must be allocated to a mobile operator.

Implementation

bool validatePhone(String phone) => normalizePhoneDigits(phone) != null;