0

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.

2
  • 1
    What is regix? Is this some new and improved technology? Otherwise, I'm assuming you meant Regex Commented May 31, 2016 at 10:51
  • This not the answer machine or the syntax checking please at least see your code carefully Commented May 31, 2016 at 12:07

2 Answers 2

4
$validator=Validator::make($request->all(),[
    'name'=>'required',
    'telephone'=>'regex:^[[0-9]\-\+]{9,15}$|required|unique:telephone',
    'email'=>'unique:telephone',]);
Sign up to request clarification or add additional context in comments.

Comments

1

regix does not exist. regex exists.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.