Skip to content

Commit

Permalink
Fixing form input key
Browse files Browse the repository at this point in the history
  • Loading branch information
MZole committed Oct 7, 2024
1 parent dc55955 commit af692c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Lombiq.Privacy/Handlers/RegistrationFormEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ public RegistrationFormEventHandler(

public Task RegistrationValidationAsync(Action<string, string> reportError)
{
var registrationCheckbox = _hca.HttpContext?.Request?.Form?[nameof(PrivacyRegistrationConsentCheckboxViewModel.RegistrationCheckbox)]
.Select(bool.Parse)
.ToList();
var registrationCheckbox = _hca.HttpContext?.Request
?.Form?["RegisterUserForm." + nameof(PrivacyRegistrationConsentCheckboxViewModel.RegistrationCheckbox)]
.Select(bool.Parse)
.ToList();

if (registrationCheckbox == null ||
(registrationCheckbox.Count > 0 && !registrationCheckbox.Contains(value: true)))
Expand Down

0 comments on commit af692c9

Please sign in to comment.