contributte / live-form-validation

:no_entry: Nice client-side live form validation for Nette Forms.
https://contributte.org/packages/contributte/live-form-validation.html
BSD 3-Clause "New" or "Revised" License
59 stars 24 forks source link

showMessageClassOnParent not working #10

Closed kleinpetr closed 8 years ago

kleinpetr commented 8 years ago

For example:

<div class="form-group col-md-6">
     {label mobile /}
     <div class="input-group">
          <span class="input-group-addon">+{$dialingCode}</span>
          {input mobile class=>'form-control'}
     </div>
</div>

snimek obrazovky 2016-02-16 v 10 51 42

Error message is inside .input-group but I set parent to .form-group

Robyer commented 8 years ago

Show me your whole configuration object of liveformvalidation, please.

kleinpetr commented 8 years ago

I downloaded latest version and I didn't change anything.

Robyer commented 8 years ago

Aha, it's because the mentioned option is for message's CLASS to show on Parent, not message itself.

I added another option for that. So, try new version please, and make sure you set messageParentClass option to 'form-group'. Then it would hopefully work.

kleinpetr commented 8 years ago

Console writes me: Uncaught SyntaxError: Unexpected token { on line 281

Missing end bracket on condition, now its working fine. Thank you for fast update :)

Robyer commented 8 years ago

Commited the missing bracket, thanks for report. :)