none
Razor Components Form Validation Problem RRS feed

  • Question

  • I am trying to get the hang of some ASP.NET Core and Razor Component stuff. I have a Razor component with an EditForm and an OnValidSubmit handler that sets a string to the value of a form field. The string is referenced in a paragraph after the form so it should show up. What I want is for the text to be set when the form is valid, but not when it is invalid. While the form is valid and I click submit, the text gets updated, and then when the form is invalid and I click submit, it does not, and the validation summary shows. But after the form is valid again and I click submit it does not update the text. This happens when there are validation errors from the previous submit but the current form is valid. If there is no validation summary of errors then the text gets updated.
    Thursday, April 25, 2019 7:35 PM

All replies

  • Hi DotNetCore77,

    Thank you for posting here.

    For your question is more related to ASP.ENT Core, you could post a new thread in ASP.NET Core forum.

    https://forums.asp.net/1255.aspx/1?ASP+NET+Core

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 26, 2019 7:37 AM