Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 257731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:07:18+00:00 2026-05-11T22:07:18+00:00

I am looking for a best-practise approach on how to do UI validation in

  • 0

I am looking for a best-practise approach on how to do UI validation in a model-view-presenter architecture.

I need to validate some forms with a lot of controls. And to make it easy for the user, I store all errors or warnings with a reference to the control in a Log which is displayed to the user afterwards so that he can jump right away to the control he has to fix. This is done in the view-part, which is actually wrong since validation should take place in the presenter in order to exchange the view.

The problem for me of doing this validation in the presenter is that it is not just checking if provided values are wrong, it also needs to check if radiobuttons have been checked which enables a textbox, which then has to contain some text for example.

I was thinking of using the BindingSource in the presenter since it’s reflecting the UI changes and is visible to the presenter. But I am not sure if this is the right way to go (and I think it’s kind of ugly)?

By the way: the validation takes not just place before I write to the database; it already takes place while the user is working on the forms.

Could anyone think of a good way of doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:07:18+00:00Added an answer on May 11, 2026 at 10:07 pm

    We finally found a solution.
    It will be done as I expected, using the DataSet in the presenter which is processed by different validator classes (one for each of our “pages”). The most difficult part is, when controls depend on each other (but in the end its just checking if values are set in the DataSet). Currently it is not possible to jump to the control to fix errors but this will be added later via Reflection by passing the name of the control to the LogEntries and the view can then figure out where this control is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for best practices for performing strict (whitelist) validation/filtering of user-submitted HTML. Main
I am looking for a best practice for End to End Authentication for internal
We are developing a new web service and are looking into the best practice
Looking for advice (perhaps best practice). We have a MS Word document (Office 2007)
I am looking for guidance regarding the best practice around the use of the
I am looking for best practices for detecting and preventing DOS in the service
I'm looking for best practices for establishing connections between Oracle 8 and Visual Studio
I'm looking for best practices for using the same data in different places without
I am looking for best practices in regards to printing from a WinForms application.
I'm looking for best-practices for designing a site that with accessibility in mind. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.