-1

I'm using Parsley to validate my inputs (not the form) and almost everything works great!

The only problem I have is that if I leave zipcode and phone fields empty, the error message appear but when I focusin and start typing, it doesn't leave like the other fields. I've tried many different regexp thinking that might be the problem but no luck so far.

///////UPDATE///////

I realized that the element that's stopping parsley from validating is a mask library used on those 2 inputs

Anyone managed to make Parsley validate even with a mask library?

jQuery(function ($) {
    $(".required_input").parsley();
});
<!--Zip Code-->
<asp:TextBox ID="txtZip" runat="server" MaxLength="7"  required="" data-parsley-trigger="focusout" data-parsley-validate="" data-parsley-error-message="*" data-parsley-pattern="^[ABCEGHJKLMNPRSTVXY][0-9][ABCEGHJKLMNPRSTVWXYZ] [0-9][ABCEGHJKLMNPRSTVWXYZ][0-9]" CssClass="UpperCase maskZip required_input"></asp:TextBox>

<!--Phone-->
<asp:TextBox ID="txtPhone" runat="server" data-parsley-trigger="focusout" required="" data-parsley-error-message="*" data-parsley-validate="" data-parsley-pattern="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" CssClass="input103size maskPhone required_input"></asp:TextBox>
Cœur
  • 37,241
  • 25
  • 195
  • 267
Collin
  • 1
  • 4
  • 3
    Fiddle or other demo page so we can see? We're going to need to see more of your page. – Abhijit Jagtap Jul 19 '16 at 16:24
  • 2
    Please give more details. We can't help if we don't see code or some type of example or something like that. – Charlie Fish Jul 19 '16 at 16:57
  • Not much to show but I've added my parsley call and my .asp structure. I can add the html if it's confusing but its pretty much the same thing – Collin Jul 19 '16 at 17:41
  • @CharlieFish Can you upvote or delete my question? Since it's a conflict in between Parsley and the Mask library I'll just make another question.. 6 months is kind of a long wait. – Collin Jul 19 '16 at 20:41
  • @Collin What? I don't have access to delete your question. Only you can do that or mods I believe. – Charlie Fish Jul 19 '16 at 20:42
  • @CharlieFish What are my options if I would like to ask another question? – Collin Jul 19 '16 at 21:01
  • @Collin I don't know. What error does it give you? – Charlie Fish Jul 19 '16 at 21:02
  • @CharlieFish Apparently I am banned because of one single question with a score of -1... so I need to reach 0 to be unbanned. If no one up votes me, I'll have to wait 6 months... see this http://stackoverflow.com/help/question-bans – Collin Jul 19 '16 at 21:11
  • @Collin it's says one or two bad posts won't ban you. But it still is? – Charlie Fish Jul 19 '16 at 21:26
  • @CharlieFish Well apparently it can since I can't post on Stack Overflow anymore... so ridiculous – Collin Jul 21 '16 at 15:28

1 Answers1

0

I realized that the element that's stopping parsley from validating is a mask library used on those 2 inputs

Collin
  • 1
  • 4