$input */ public function create(array $input): User { Validator::make($input, [ 'name' => ['required', 'string', 'max:255'], 'username' => ['required', 'string', 'max:255', 'unique:users'], 'email' => ['string', 'email', 'max:255'], 'phone' => ['phone:mobile'], 'password' => $this->passwordRules(), 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '', ])->validate(); return User::create([ 'name' => $input['name'], 'username' => $input['username'], 'email' => $input['email'], // 'phone' => $input['phone'], 'phone' => phone($input['phone'])->formatE164(), 'password' => Hash::make($input['password']), ]); } }