“nomor telepon validasi formulir laravel” Kode Jawaban

Laravel memvalidasi nomor telepon

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-9\s\-\+\(\)]*)$/|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.
Valentino_Rossi

nomor telepon validasi formulir laravel

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

Validasi nomor telepon dengan kode dial Laravel 8

'mobile' => ['required', function ($attribute, $value, $fail) use ($parameters) {
                if (($value + strlen($parameters['code'])) < 15) {
                    $fail('Mobile number is too long');
                }
            }
Tyagi420

Jawaban yang mirip dengan “nomor telepon validasi formulir laravel”

Pertanyaan yang mirip dengan “nomor telepon validasi formulir laravel”

Lebih banyak jawaban terkait untuk “nomor telepon validasi formulir laravel” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya