wishva/sri_lanka_mobile_number_validator

Used regular expression with PHP to validate the number. Take a look and you will understand

1.0 2022-02-28 17:26 UTC

This package is auto-updated.

Last update: 2024-09-28 23:55:57 UTC


README

version 1.0

This code is made to validate Sri Lankan mobile phone numbers and you can use this in your forms

You can use this regular expression with other languages as well here it has used with PHP

Install this as a composer package 👇

composer require wishva/sri_lanka_mobile_number_validator

Sample code

"<?php

use MobileNumberValidation\MobileNumberValidator;

include_once 'vendor/autoload.php';

$numberValidateObj = new MobileNumberValidator();

if($numberValidateObj->mobileValidatorFunction("xxxxxxxxxx")) //xxxxxxxxxx - 10 digits mobile number

{

echo "yes";

}else{

echo "no";

} "