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 7158767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:07:15+00:00 2026-05-28T13:07:15+00:00

I was looking this site for data validation: http://codeblitz.wordpress.com/2009/05/08/wpf-validation-made-easy-with-idataerrorinfo/ And it sounds great the

  • 0

I was looking this site for data validation:

http://codeblitz.wordpress.com/2009/05/08/wpf-validation-made-easy-with-idataerrorinfo/

And it sounds great the validation. But for example I realized you can only validate data when the input is correct, if there’s a way to set a message when the input is not correct.

I.E. If I have a property Age where is an int, I want to custom the error message to display where the user wrote “a” in a textBox.

I mean, Age property must validate two things, the input will be correct and the range.

  • 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-28T13:07:16+00:00Added an answer on May 28, 2026 at 1:07 pm

    Assuming you are using Data-Binding, you need to validate your input with validation rules:

    <TextBox Name="tb_act_name"
                             Style="{StaticResource formTextBox}"
                             Validation.ErrorTemplate="{StaticResource validationTemplate}">
                      <TextBox.Text>
                        <Binding Path="act_name"
                                 Mode="TwoWay"
                                 UpdateSourceTrigger="PropertyChanged"
                                 ValidatesOnDataErrors="True">
                          <Binding.ValidationRules>
                            <local:fieldNullOrEmpty ErrorMessage="Enter Client Name" />
                          </Binding.ValidationRules>
                        </Binding>
                      </TextBox.Text>
                    </TextBox>
    

    You would simply add more rules in the Binding.ValidationRules section. This is quite a big subject so you may wish to check out MSDN WPF Validation for more help.

    Hope this points you in the right direction.

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

Sidebar

Related Questions

I'm looking to replicate the image zooming on this site: http://www.endless.com/adidas-Originals-adiracer-Trefoil-Sneaker/dp/B001I44OIG/183-5587133-4823042?ie=UTF8&cAsin=B001I44O2W&qid=1241466506612&asinTitle=adidas%20Originals%20adiracer%20Trefoil%20HG%20Sneaker&ref_=sw_1&asins=B001I44O2W%2CB001I457WS%2CB001LDJ2MM%2CB001HBH5LS%2CB001O9BJ4C%2CB001VNCNI2%2CB001LDJ7M2%2CB001LNNY44%2CB001LDJ2UE%2CB001OONDCS%2CB001HBH4FA%2CB001OOMWUW&refURL=%252Fb%252F241993011%253F&contextTitle=Search%20Results&fromPage=asinlist&suppressRedirect=1 When you mouse
looking at this example of the jquery ui slider http://jqueryui.com/demos/slider/#steps i want to be
Hey, I stumbled upon this site looking for solutions for event overlaps in mySQL
I'm looking for suggestions for debugging... If you view this site in Firefox or
I'm currently looking into validation for my WPF app and seen the mention of
My company is looking at various PHP frameworks to build a customer's site. This
We have a drupal site and we wish to export data from this site
I saw this example about storing login information in cookie. http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/ Tried it, but
Looking at this jQuery example, how can I modify the code so that it
I've been looking for this information for my commercial desktop product, with no avail.

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.