Welcome Guest Search | Active Topics | Sign In | Register

MaskedEdit and IsValid Options
Louis
Posted: Saturday, December 27, 2008 12:58:25 PM
Rank: Member
Groups: Member

Joined: 10/16/2008
Posts: 16
Hi agaiin,

I try to validate a Canadian postal code and I use Mask=">L0L 0L0". By example, if I enter J7 and check with IsValid (server side of course) it's always valid.


<eo:MaskedEdit ID="TextBoxCodePostal" Width="100px" runat="server" CssClass="textfield" ToolTip="<%$ Resources:ToolTipCodePostal %>">
<eo:MaskedEditSegment Mask="&gt;L0L 0L0" SegmentType="Mask"/>
</eo:MaskedEdit>

Server Side
// Valider le code postal
TextBoxCodePostal.Text = TextBoxCodePostal.Text.Trim();
if (!TextBoxCodePostal.IsValid)
{
...

I possible to have False for IsValid if the value is not complete according the mask?

Thank you
eo_support
Posted: Monday, December 29, 2008 5:14:47 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Try to set the segment's IsRequired to true. IsValid does not check any segment that is not required.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.