Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

MaskedEditExtender with ValidationExpression - validation issue before submitting the form

$
0
0
<td width="200" align="left"><asp:TextBox ID="tbPlanedPickUpTime" CssClass="mtb tbxTime" Width="150px" runat="server" />&nbsp;<span class="asterisk">*</span><ajaxToolkit:MaskedEditExtender runat="server" ID="meePlannedPickUpTime"
MaskType="Number" Mask="99:99-99:99" TargetControlID="tbPlanedPickUpTime" MessageValidatorTip="True" ClearTextOnInvalid="True" OnInvalidCssClass="validationError" ClearMaskOnLostFocus="True"></ajaxToolkit:MaskedEditExtender><ajaxToolkit:MaskedEditValidator runat="server" ID="mevPlannedPickUpTime" ControlToValidate="tbPlanedPickUpTime"
ControlExtender="meePlannedPickUpTime" Display="dynamic" IsValidEmpty="False"  ValidationExpression="^([0-1][0-9]|[2][0-3])([0-5][0-9])([0-1][0-9]|[2][0-3])([0-5][0-9])$" EmptyValueMessage="EmptyValueMessage" ErrorMessage="ErrorMessage" InvalidValueMessage="InvalidValueMessage" ValidateRequestMode="Inherit" /></td>


Hello. I have a problem using MaskedEditExtender to ValidationExpression.

When I enter the numbers and lost focus everything is fine - the mask works, validation works. For example - 12:12-12:12 is valid but 12:99-12:99 is invalid.

Whenever I try to submit the form, the validation always changes to Invalid.

Why can't I send the form? It looks like the regular expression was correct when typing text, but not when submitting the form.

Could someone please help me?

Best wishes,

B.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>