PDA

View Full Version : [CLOSED] [#677] Field is not being marked as invalid when it has a InputMask



RaphaelSaldanha
Dec 31, 2014, 6:24 AM
On the following example, when Validate Form button is clicked, only Field 1 is marked as invalid, but Field with Input Mask should also be marked as invalid

http://forums.ext.net/attachment.php?attachmentid=18031&stc=1



<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<ext:ResourceManager runat="server" ScriptMode="Debug" />

<ext:FormPanel ID="_frm" Title="Form" DefaultAnchor="100%" Width="400" Height="300" runat="server">
<FieldDefaults LabelAlign="Top" MsgTarget="Side" />
<Items>
<ext:TextField FieldLabel="Field 1" AllowBlank="false" runat="server" />

<ext:TextField FieldLabel="Field with Input Mask" PreventMark="false" AllowBlank="false" runat="server">
<Plugins>
<ext:InputMask Mask="9999" ClearWhenInvalid="false" AlwaysShow="true" runat="server" />
</Plugins>
</ext:TextField>
</Items>
<Buttons>
<ext:Button Text="Validate Form" runat="server">
<Listeners>
<Click Handler="App._frm.isValid();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</body>
</html>


InputMask's clearInitError sets Field's preventMark to true but does not revert to its original value.

so, it's possible to overcome the issue presented above by doing the following:


Ext.net.InputMask.override({
enable: function () {
var field = this.getCmp();

var preventMark = field.preventMark;

this.callParent(arguments);

field.preventMark = preventMark;
}
});


http://forums.ext.net/attachment.php?attachmentid=18041&stc=1

RaphaelSaldanha
Jan 14, 2015, 12:31 PM
I confirm that this issue is still reproducible on version 3.1.0.

RCN
Jan 29, 2015, 1:39 PM
Any update?

Daniil
Feb 04, 2015, 1:37 PM
Hi Raphael,

Thank you for the report!

Created an Issue:
https://github.com/extnet/Ext.NET/issues/677

Fixed in the revision 6306 (trunk). It goes to 3.1.0 beta.

RCN
Feb 04, 2015, 2:48 PM
Thank you Daniil.