0

I am trying to validate my form using the validate request controller so far i have:

public function register_check(Request $request) {
        $this->validate($request, [
            'username'=> 'required|min:6|max:20',   
            'email'=> 'required|unique',
            'password'=> 'required|min:6|max:30',
            'repeat_password'=>'required|same:password'
        ]);
    }

I am new to laravel.

2
  • Validation rule unique requires at least 1 parameters. Commented Jul 27, 2017 at 1:33
  • sorry i forgot to include Commented Jul 27, 2017 at 1:34

1 Answer 1

2

the 'email' part, try using 'required|unique:users , the users is your users table name.

Sign up to request clarification or add additional context in comments.

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.