Reputation: 9863
I have the following validation rules in controller for email validation. But it takes domain name twice or more like [email protected]
$rules = [
'email' => 'required|email|unique:users'
];
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
return redirect()->back()->withErrors($validator)->withInput();
}
My form.blade.php is
<div class="form-group">
<label for="">Email </label>
<input type="email" class="form-control" name="email" placeholder="Enter mail ID"/>
</div>
I want to restrict domain name to one like [email protected] not [email protected]
Thanks
Upvotes: 0
Views: 1052
Reputation: 745
Please sent verification email after complete necessary validation in JS and PHP.
Upvotes: 1