Reputation: 317
I am trying to validate the telephone number using the regix. but it is giving me error:
$validator=Validator::make($request->all(),[
'name'=>'required',
'telephone'=>'regix:^[[0-9]\-\+]{9,15}$|required|unique:telephone',
'email'=>'unique:telephone',]);
the error is:
Method [validateRegix] does not exist.
Upvotes: 0
Views: 96
Reputation: 977
$validator=Validator::make($request->all(),[
'name'=>'required',
'telephone'=>'regex:^[[0-9]\-\+]{9,15}$|required|unique:telephone',
'email'=>'unique:telephone',]);
Upvotes: 4