I'm trying to implement a masquerade and validate the email field using the inputmask plugin without success to mask it does not appear and consequently does not validate , because ?
Here is the code:
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src='<%= Page.ResolveUrl("~/jquery-3.3.1.min.js") %>'></script>
<script src='<%= Page.ResolveUrl("~/scripts/inputmask/jquery.inputmask.js") %>'></script>
<script type="text/javascript">
(function ($) {
$(function () {
$('#txtEmail').inputmask({
mask: "*{1,20}[.*{1,20}][.*{1,20}][.*{1,20}]@*{1,20}[.*{2,6}][.*{1,2}]",
greedy: false,
onBeforePaste: function (pastedValue, opts) {
pastedValue = pastedValue.toLowerCase();
return pastedValue.replace("mailto:", "");
},
definitions: {
'*': {
validator: "[0-9A-Za-z!#$%&'*+/=?^_'{|}~\-]",
casing: "lower"
}
}
});
});
})(jQuery);
</script>
<div class="col-md-8">
<label for="txtEmail" class="font-weight-bold">Email</label>
<asp:TextBox ID="txtEmail" runat="server" class="form-control" MaxLength="50" ToolTip="Digite o Email" ClientIDMode="Static"></asp:TextBox>
</div>
</asp:Content>
Error
Uncaught TypeError: Inputmask is not a constructor
at w.fn.init.$.fn.inputmask (jquery.inputmask.js:76)
at HTMLDocument.<anonymous> (CadUsuario.aspx?idusuario=7:259)
at l (VM792 jquery-3.3.1.min.js:2)
at c (VM792 jquery-3.3.1.min.js:2)