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=">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
|
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!
|