Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren Hunter 140 posts 232 karma points
    Oct 25, 2022 @ 16:02
    Darren Hunter
    0

    Error message not been passed back in Forms

    Hi,

    I have updating a custom recaptcha to meat the needs of the client and there site, the site was originally a version 8 site and all worked as expected.

    Now the sites in the process of been upgraded to version 10 I have hit an issue where by I have the following code:

    public class FormValidateNotificationHandler : INotificationHandler

                Boolean isvalid = IsValidCaptcha(notification.Context);
    
               if (!isvalid)
                {
                    notification.ModelState.AddModelError("recaptchaError", "There has been a problem validating your form. Please reload the page and try again.");
    
                }
    

    }

    I know it adding the .AddModelError message to the model but that message dose not seem to be getting propagated back to the calling form.

    What am I missing??????

Please Sign in or register to post replies

Write your reply to:

Draft