validationData(), 'uri') ? (new TwoFAccountUriRequest)->rules() : (new TwoFAccountStoreRequest)->rules(); return $rules; } /** * Prepare the data for validation. * * @return void */ protected function prepareForValidation() { $this->merge([ 'otp_type' => strtolower($this->otp_type), 'algorithm' => strtolower($this->algorithm), ]); } }