Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel validate telephone number

SEVERAL WAYS TO DO IT:
------
* by using regex in the suitable Laravel Controller:

'phone' => 'required|regex:/(01)[0-9]{9}/' => ( add 'required' only if the field is required, else delete it!)
OR smthin like dis
'phone_number' => 'required|regex:/^([0-9s-+()]*)$/|min:10'
---------
* use this library: https://github.com/propaganistas/laravel-phone
---------
* use this in the corresponding laravel Controller:

 'phone' => 'required | numeric | digits:10 | starts_with: 6,7,8,9'
---------
* You can use a service like Nexmo or Twilio if you need to properly validate phone numbers.
Comment

laravel form validation phone number

'phone' => 'required|regex:/(01)[0-9]{9}/'
Comment

PREVIOUS NEXT
Code Example
Php :: wpml get current language filter 
Php :: create and download text file in php 
Php :: array_unique 
Php :: laravel https assets 
Php :: key of last element php 
Php :: error log php array 
Php :: There is no existing directory at "/var/www/storage/logs" and it could not be created: Permission denied 
Php :: php regex remove file extension 
Php :: php curl delete request 
Php :: how to run specific seeder in laravel 
Php :: php loop through array 
Php :: string to uppercase laravel 
Php :: install phpmyadmin ubuntu 
Php :: base64 encode username password php example 
Php :: laravel inline if 
Php :: php request uri 
Php :: how to use join query in codeigniter 
Php :: php sha256 example 
Php :: laravel find or fail exception 
Php :: how to remove token while logout using laravel 8 
Php :: php echo alert js 
Php :: 419 unknown status 
Php :: Your Composer dependencies require a PHP version "= 7.3.0" 
Php :: laravel collection shuffle 
Php :: run laravel localhost network 
Php :: get product category url woocommerce 
Php :: old function use in checkbox selected in laravel blade 
Php :: php milliseconds 
Php :: carbon time ago laravel 
Php :: unset _post 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =