Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ namespace MyFormsExtensions
}

// A sample validation
var email = GetPostFieldValue(notification.Form, "email");
var email = GetPostFieldValue(notification.Form, notification.Context, "email");
var emailConfirm = GetPostFieldValue(notification.Form, notification.Context, "verifyEmail");

// If the validation fails, return a ModelError
if (email.ToLower() != emailConfirm.ToLower())
{
notification.ModelState.AddModelError(GetPostField(e, "verifyEmail").Id.ToString(), "Email does not match");
notification.ModelState.AddModelError(GetPostField(notification.Form, "verifyEmail").Id.ToString(), "Email does not match");
}
}
}
Expand Down Expand Up @@ -182,4 +182,4 @@ When an entry for a form is rendered in the backoffice, and event is available t
notification.EntrySearchResult.Fields = transformedFields;
}
}
```
```