Telefonnummer als Pflichtpfeld bei Registrierung
This commit is contained in:
parent
ba11930641
commit
b6f0bae4df
3 changed files with 18 additions and 1 deletions
|
|
@ -52,6 +52,7 @@ class RegisterController extends Controller
|
|||
return Validator::make($data, [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||
'mobile' => ['required', 'string', 'max:255'],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
||||
]);
|
||||
}
|
||||
|
|
@ -67,6 +68,7 @@ class RegisterController extends Controller
|
|||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'mobile' => $data['mobile'],
|
||||
'password' => Hash::make($data['password']),
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email', 'password',
|
||||
'name', 'email', 'password','mobile'
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -39,6 +39,21 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-right">Telefonnummer</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="mobile" type="text" class="form-control @error('mobile') is-invalid @enderror" name="mobile" value="{{ old('mobile') }}" required autocomplete="mobile">
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-right">Passwort</label>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue