I have validated UAE based phone number in laravel
By following numbers
$messages = [
'required' => 'The :attribute field is required.',
'integer' => 'The :attribute field value should be an integer.',
'regex' => 'The :attribute is invalid',
'digits' => 'The :attribute is invalid',
];
$validator = Validator::make(
$request->all(),
[
'number' => 'required|digits:12|regex:/(9715)[0-9]{8}/',
'service' => 'required|integer'
],
$messages
);
But is there any way to validate all countries numbers? Not only UAE based. I would like to appreciate if someone guide me about this
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2XFCkGZ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire