Hide regular expression validations in a winpart

Hide regular expression validations in a winpart

Old forum URL: forums.lhotka.net/forums/t/4844.aspx


juancho559 posted on Wednesday, May 14, 2008

Hi,

I have a winpart with an errorProvider bound to a bindingsource. When I run the application, in the winpart, the business validation rules appear like an icon next to the control. It's perfect, but I just need that this icons appear for the required validation rules when a winpart start. In this instance, I don't need that appear the regular expression validation.

The behavior that I'm looking for is like a form with an email field. I just need that an error appear when I wrote something wrong in the control bound to the email field, but if the control hasn't a value, no problem, the error doesn't appear.

Somebody knows How can I get this behavior?

Regards...

sergeyb replied on Wednesday, May 14, 2008

If I understand you correctly, you just need to create a custom rule for a property that understands that no value is a valid value.  Is this what you are looking for?

 

Sergey Barskiy

Senior Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: juancho559 [mailto:cslanet@lhotka.net]
Sent: Wednesday, May 14, 2008 11:59 AM
To: Sergey Barskiy
Subject: [CSLA .NET] Hide regular expression validations in a winpart

 

Hi,

I have a winpart with an errorProvider bound to a bindingsource. When I run the application, in the winpart, the business validation rules appear like an icon next to the control. It's perfect, but I just need that this icons appear for the required validation rules when a winpart start. In this instance, I don't need that appear the regular expression validation.

The behavior that I'm looking for is like a form with an email field. I just need that an error appear when I wrote something wrong in the control bound to the email field, but if the control hasn't a value, no problem, the error doesn't appear.

Somebody knows How can I get this behavior?

Regards...



juancho559 replied on Wednesday, May 14, 2008

Hi Sergey,

Yes, it's exactly that I'm looking for!!

Regards... 

Copyright (c) Marimer LLC